clock_alarm


Function - Set off an alarm.

SYNOPSIS

kern_return_t   clock_alarm
                (clock_t                             clock_name,
                 alarm_type_t                        alarm_type,
                 tvalspec_t                          alarm_time,
                 mach_port_t                   alarm_reply_port);

PARAMETERS

clock_name
[in clock-name send right] The name (or control) port for the clock.

alarm_type
[in scalar] How to interpret the alarm_time value:

TIME_RELATIVE
Interpret the alarm time as relative to the current time.

TIME_ABSOLUTE
Interpret the alarm time as an absolute time.

alarm_time
[in structure] The time when the alarm is to be sent.

alarm_reply_port
[in alarm receive (to be converted to send-once) right] A port into which the alarm message is to be sent.

DESCRIPTION

The clock_alarm function requests that a clock send an alarm message to a specified port at a given future time. The alarm message is specified by the clock_alarm_reply server interface.

NOTES

If the specified alarm time is in the past, the alarm message is sent immediately and time-stamped with the current time. Otherwise, the alarm is queued and delivered at the specified alarm time and time-stamped at that time.

The alarm will be serviced at the service time nearest the specified alarm time as governed by the current clock alarm resolution.

Not all clocks implement this service, but the REALTIME clock must. If the clock does not provide this service, this call is ignored.

RETURN VALUES

Only generic errors apply.

RELATED INFORMATION

Functions: host_get_clock_service, clock_get_attributes, clock_get_time, clock_sleep, clock_alarm_reply.

Data Structures: tvalspec.