|
||
Provides timers that asynchronously notify an application after an interval or at a specific time.
The User
class in the System Static Functions
API provides simple functions to suspend a thread for a given interval or until
a specific time.
The API has three key concepts: simple timer, periodic timer, and heartbeat timer.
The simple timer produces an event at a given system time or
after a given interval. It is provided by RTimer
. This
service is wrapped in an active object by CTimer
.
A periodic timer produces a sequence of events at a specified
interval. The application is called through a callback
(TCallBack
) when they occur. It is provided by
CPeriodic
.
A heartbeat timer is similar to a periodic timer. However, if the application is busy handling another event when the timer event occurs, a periodic timer simple delays delivering the event, while a heartbeat timer will inform the application that it has missed the event.
It is provided by CHeartbeat
. Applications
are alerted to timer events through implementing an interface
MBeating
.