Alarm Handler

An alarm handler is a time event handler that starts at a specified time. Functions are provided for creating and deleting an alarm handler, activating and deactivating the alarm handler, and referencing the alarm handler status. An alarm handler is an object identified by an ID number called an alarm handler ID.

The time at which an alarm handler starts (called the alarm time) can be set independently for each alarm handler. When the alarm time arrives, exinf, containing extended information about the alarm handler, is passed to it as a starting parameter.

After an alarm handler is created, initially it has no alarm time set and is in inactive state. The alarm time is set when the alarm handler is activated by calling tk_sta_alm, as relative time from the time that the system call is executed. When tk_stp_alm is called deactivating the alarm handler, the alarm time setting is canceled. Similarly, when the alarm time arrives and the alarm handler runs, the alarm time is canceled and the alarm handler becomes inactive.

Comments

Click here to Post a Comment