The underlying Timer instance used for proxying methods.
The underlying Timer instance used for proxying methods.
Called when a task takes longer than the specified maximum duration
Called when a task takes longer than the specified maximum duration
Called when a task is observed to be executing longer than the specified maximum duration
Called when a task is observed to be executing longer than the specified maximum duration
Performs an operation at the specified time.
Performs an operation after the specified delay.
Run f
every elapsed period
, starting period
from now.
Run f
every elapsed period
, starting period
from now.
Run f
at time when
; subsequently run f
at every elapsed period
.
Run f
at time when
; subsequently run f
at every elapsed period
.
If when
is negative or undefined, it will be treated as Time.epoch.
If period
is negative or undefined, the timer task will be rescheduled
immediately (i.e., period
will be treated as Duration.Zero).
Run f
at time when
.
Run f
at time when
.
If when
is negative or undefined, it will be treated as Time.epoch.
Stop the timer.
Stop the timer. Pending tasks are cancelled. The timer is unusable after being stopped.
An abstract ProxyTimer that provides callback methods which are called when a task takes longer than the specified maximum runtime or if a task is observed to be taking longer than the specified maximum runtime.
This makes assumptions that the underlying
,Timer
will execute tasks sequentially in order to catch slow running tasks during execution. If the underlyingTimer
executes tasks in parallel the callbackslowTaskExecuting
will become unreliable. However, theslowTaskCompleted
callback will remain reliable but must be a thread-safe implementation.Observation of slow task execution is performed when scheduling more work to avoid the overhead of another thread or timer checking on tasks. This results in lower overhead but means that slow running tasks may not be observed while executing. However, they will trigger a callback to the
slowTaskCompleted
regardless of whether additional work is scheduled.