rollingDuration

open fun rollingDuration(range: Duration, unit: Duration): Real

(DOC) Calculates the sum of durations of objects in a range leading the current time.

This returns a real profile that equals, at each time t, the duration of objects in the interval [t, t+range].

Real profiles can't actually represent durations, only unitless numbers, so the result is actually calculated as a multiple of the provided unit.

Parameters

range

how far into the future to look

unit

the time basis vector of the result; the unit of time that the result counts.