NAME
A member of omni::chrono::async_timer
omni::chrono::async_timer::tick
A member of omni::chrono::async_timer
#include <omni/chrono/async_timer.hpp>
omni::chrono::timer_event omni::chrono::async_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
Since the timer event happens on a new thread, care must be taken to make sure the attached delegate is re-entrant. Additionally, you must be aware that it is possible to have 2 events fire simultaneously if the attached delegate executes for longer than the specified interval.
top
Since the timer event happens on a new thread, care must be taken to make sure the attached delegate is re-entrant. Additionally, you must be aware that it is possible to have 2 events fire simultaneously if the attached delegate executes for longer than the specified interval.
top
NOTES
This timer will invoke a
top
This timer will invoke a
tick
event at a specified interval regardless of how long the event delegate takes to complete. In other words, every time
the timer fires, a new thread is spawned invoking the attached delegate. If the timer is stopped before the interval has elapsed, no subsequent tick events will fire, however, any currently running tick events will finish.
top