class documentation
A RecurrenceRule
is a callable that takes a reference time and a current time, and computes series of steps between the current recurrence and a new reference time for the next call.
Depending on the application, StepsT type can either be an integer (i.e.: a count of the number of steps that have passed between the reference time and the current time) or a collection of specific previous step timestamps, usually a collection of WhenT.
Method | __call__ |
Given a reference time and a current time, compute the steps between the calls and the next reference time. |
Given a reference time and a current time, compute the steps between the calls and the next reference time.
Parameters | |
reference:WhenT | the time at which the current invocation was scheduled to occur; i.e. the time that the call was computed to have been called. |
current:WhenT | the time at which the current invocation actually occurred; i.e. the time that the event loop got around to actually calling the function. |
Returns | |
tuple[ | a 2-tuple of:
|
Note | |
The delta between the reference time and the current time will often be quite small. If a system is running actively and is not overloaded, then this delta will be close to zero. However, there are cases (some examples: a laptop goes to sleep, then wakes up hours later; a program schedules a call in a database and is not run for several weeks) when this delta can be very large. |