Int CiTRCreateTimer (
Int, /* time until timer goes off */
Void (*) (Int,Void *),/* routine to be called when timer expires */
Void * ); /* user data that will be provided on callback */
Int CiTRCancelTimer (Int); /* identifier of the timer */
Void CiTRDisableTimers();
Any existing alarm(2) callbacks are preserved.
Procedure: CiTRCreateTimer
Description: Routine to start the timer
Return: identifier for the timer. This is a unique number that
will be passed as a parameter when the callback routine
is called. It is also used for CiTRCancelTimer
-1 returned if no timers are available
-2 invalid parameter
Parameters: secs time until timer goes off
callback routine to be called when timer expires
Globals: nextalarm recalculated at exit
activetimers recalculated as callbacks invoked
generation incremented
Side Effect: resets the SIGALRM signal handler (either to self, or previous)
may start the alarm timer
Procedure: CiTRCancelTimer
Description: Cancels the timer whose id was returned as ID
Return: Time before alarm was due to go off
Parameters: ID returned by CiTRCreateTimer
Globals: nextalarm recalculated at exit
activetimers recalculated as callbacks invoked
generation incremented
Side Effect: None
Procedure: CiTRDisableTimers
Description: Temporarily disables timers.
(for when you are running noninterruptable code)
Return: None
Parameters: None
Globals: None
Side Effect: None
Procedure: CiTRReenableTimers()
Description:
Return: None
Parameters: None
Globals: None