4 <strong>Function
</strong> - Set off an alarm.
7 <strong>kern_return_t clock_alarm
</strong>
8 <strong>(clock_t
</strong> <var>clock_name
</var>,
9 <strong>alarm_type_t
</strong> <var>alarm_type
</var>,
10 <strong>tvalspec_t
</strong> <var>alarm_time
</var>,
11 <strong>mach_port_t
</strong> <var>alarm_reply_port
</var><strong>);
</strong>
16 <dt> <var>clock_name
</var>
18 [in clock-name send right]
19 The name (or control) port for the clock.
21 <dt> <var>alarm_type
</var>
24 How to interpret the
<var>alarm_time
</var> value:
27 <dt> <strong>TIME_RELATIVE
</strong>
29 Interpret the alarm time as relative to the current time.
31 <dt> <strong>TIME_ABSOLUTE
</strong>
33 Interpret the alarm time as an absolute time.
36 <dt> <var>alarm_time
</var>
39 The time when the alarm is to be sent.
41 <dt> <var>alarm_reply_port
</var>
43 [in alarm receive (to be converted to send-once) right]
45 which the alarm message is to be sent.
49 The
<strong>clock_alarm
</strong> function requests that a clock send
51 specified port at a given future time. The alarm message is specified by the
52 <strong>clock_alarm_reply
</strong> server interface.
55 If the specified alarm time is in the past, the alarm message
57 and time-stamped with the current time. Otherwise, the alarm is queued and
58 delivered at the specified alarm time and time-stamped at that time.
60 The alarm will be serviced at the service time nearest the specified
62 as governed by the current clock alarm resolution.
64 Not all clocks implement this service, but the REALTIME clock must. If the
65 clock does not provide this service, this call is ignored.
66 <h3>RETURN VALUES
</h3>
68 Only generic errors apply.
69 <h3>RELATED INFORMATION
</h3>
72 <a href=
"host_get_clock_service.html"><strong>host_get_clock_service
</strong></a>,
73 <a href=
"clock_get_attributes.html"><strong>clock_get_attributes
</strong></a>,
74 <a href=
"clock_get_time.html"><strong>clock_get_time
</strong></a>,
75 <a href=
"clock_sleep.html"><strong>clock_sleep
</strong></a>,
76 <a href=
"clock_alarm_reply.html"><strong>clock_alarm_reply
</strong></a>.
79 <a href=
"tvalspec.html"><strong>tvalspec
</strong></a>.