Infrasctucture Alrm Function Reference

Alrm
The alarm layer allows processes to execute a call-back function or an event at a predetermined time or a time relative to NOW.    Alarms are volatile, that is, when it triggers, it ceases to exist and, if desired, must be re-registered in order to be fired again.    If an event is required, lrmReg's or lrmPlus's function argument is the event code.
Alarm Call-Back Prototype: callBackFunction( RegisteredArgument )

lrmReg     lrmPlus     lrmDreg    

int  lrmReg( int hr, int min, int sec, pfi_t func, void* CBarg )
Register an alarm call back to occur at exactly "hr":"min":"sec".    It the new "hr" is less than the current hour, it is assumed that you mean tomorrow and the day is advanced.    At the specified time, the function "func" will be called and passed "CBarg" as it's argument.    The func argument can alternately be an event code and when the time is reached the event will be triggered (remember, alarms are volatile).

int  lrmPlus( int hr, int min, int sec, pfi_t func, void* CBarg )
Register an alarm call back to occur at "hr":"min":"sec" from now.    At the specified relative time, the function "func" will be called and passed "CBarg" as it's argument.    The func argument can alternately be an event code and when the time is reached the event will be triggered (remember, alarms are volatile).

int  lrmDreg( pfi_t func, void* CBarg )
Un-register an alarm call back using the function and it's argument as identifies.