NAME
A member of omni::chrono::sync_timer
omni::chrono::sync_timer::tick
A member of omni::chrono::sync_timer
#include <omni/chrono/sync_timer.hpp>omni::chrono::timer_event omni::chrono::sync_timer::tick
DESCRIPTION
The event that is raised when the timer elapses. Each delegate is called in the order to which it was attached. The tick event is supposed to be a short-lived function, or you are to ensure that a separate thread is called to handle the elapsed time.
top
The event that is raised when the timer elapses. Each delegate is called in the order to which it was attached. The tick event is supposed to be a short-lived function, or you are to ensure that a separate thread is called to handle the elapsed time.
top
CONSIDERATIONS
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
top
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
NOTES
This timer will invoke a
top
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