]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/clock_alarm.html
xnu-2422.1.72.tar.gz
[apple/xnu.git] / osfmk / man / clock_alarm.html
CommitLineData
13fec989
A
1<h2>clock_alarm</h2>
2<hr>
3<p>
4<strong>Function</strong> - Set off an alarm.
5<h3>SYNOPSIS</h3>
6<pre>
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>
12</pre>
13<h3>PARAMETERS</h3>
14<dl>
15<p>
16<dt> <var>clock_name</var>
17<dd>
18[in clock-name send right]
19The name (or control) port for the clock.
20<p>
21<dt> <var>alarm_type</var>
22<dd>
23[in scalar]
24How to interpret the <var>alarm_time</var> value:
25<dl>
26<p>
27<dt> <strong>TIME_RELATIVE</strong>
28<dd>
29Interpret the alarm time as relative to the current time.
30<p>
31<dt> <strong>TIME_ABSOLUTE</strong>
32<dd>
33Interpret the alarm time as an absolute time.
34</dl>
35<p>
36<dt> <var>alarm_time</var>
37<dd>
38[in structure]
39The time when the alarm is to be sent.
40<p>
41<dt> <var>alarm_reply_port</var>
42<dd>
43[in alarm receive (to be converted to send-once) right]
44A port into
45which the alarm message is to be sent.
46</dl>
47<h3>DESCRIPTION</h3>
48<p>
49The <strong>clock_alarm</strong> function requests that a clock send
50an alarm message to a
51specified port at a given future time. The alarm message is specified by the
52<strong>clock_alarm_reply</strong> server interface.
53<h3>NOTES</h3>
54<p>
55If the specified alarm time is in the past, the alarm message
56is sent immediately
57and time-stamped with the current time. Otherwise, the alarm is queued and
58delivered at the specified alarm time and time-stamped at that time.
59<p>
60The alarm will be serviced at the service time nearest the specified
61alarm time
62as governed by the current clock alarm resolution.
63<p>
64Not all clocks implement this service, but the REALTIME clock must. If the
65clock does not provide this service, this call is ignored.
66<h3>RETURN VALUES</h3>
67<p>
68Only generic errors apply.
69<h3>RELATED INFORMATION</h3>
70<p>
71Functions:
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>.
77<p>
78Data Structures:
79<a href="tvalspec.html"><strong>tvalspec</strong></a>.