omni::chrono::sync_timer

SYNOPSIS

A timer class that invokes a basic tick event synchronously.

top

DESCRIPTION

This timer will invoke a tick event at a specified interval and will not tick again until the attached delegate has completed, regardless of how long the specified interval is; in this way the tick event is a blocking event. If the timer is stopped before the interval has elapsed, any subsequent tick events will not fire.

top

NOTES

While the timer event is a blocking event, the timer does happen on a separate thread, and care must be taken that any shared data in the attached delegate is protected in a thread-safe way. Additionally, it should be noted that it is possible for the total time elapsed to be longer than the specified interval if the attached delegate executes or blocks for longer than the interval.

top