OSSetAlarm

Syntax

#include <cafe/os.h>

typedef void (* OSAlarmHandler)(OSAlarm* alarm, OSContext* context);

BOOL OSSetAlarm(OSAlarm* alarm, OSTime tick, OSAlarmHandler handler);

Parameters

alarm Pointer to the alarm to set.
tick Delay in ticks after the function is invoked but before the alarm handler is invoked.
handler Alarm handler to call.

Return Values

BOOL indicating whether the alarm was previously initialized.

Description

Sets a one-time alarm. The alarm must have been previously created and initialized using OSCreateAlarm.

CAUTION:
Do not allocate or use an OSContext through an address that was mapped by the OSMapMemory function. For more information, see OSMapMemory.

Do Not Call From

None.

See Also

OSCancelAlarm
OSCreateAlarm
OSSetPeriodicAlarm
OSWaitAlarm

Revision History

2014-01-24 Added Caution to Description block.
2013-05-08 Automated cleanup pass.
2012-07-25 Cleanup pass.
2011-03-17 Added BOOL result to the function.
2010-08-30 Initial version.


CONFIDENTIAL