clock_alarm.html   [plain text]

<strong>Function</strong> - Set off an alarm.
<strong>kern_return_t   clock_alarm</strong>
                <strong>(clock_t</strong>                             <var>clock_name</var>,
                 <strong>alarm_type_t</strong>                        <var>alarm_type</var>,
                 <strong>tvalspec_t</strong>                          <var>alarm_time</var>,
                 <strong>mach_port_t</strong>                   <var>alarm_reply_port</var><strong>);</strong>
<dt> <var>clock_name</var> 
[in clock-name send right]
The name (or control) port for the clock.
<dt> <var>alarm_type</var> 
[in scalar]
How to interpret the <var>alarm_time</var> value:
<dt> <strong>TIME_RELATIVE</strong>
Interpret the alarm time as relative to the current time.
<dt> <strong>TIME_ABSOLUTE</strong>
Interpret the alarm time as an absolute time.
<dt> <var>alarm_time</var> 
[in structure]
The time when the alarm is to be sent.
<dt> <var>alarm_reply_port</var> 
[in alarm receive (to be converted to send-once) right]
A port into 
which the alarm message is to be sent.
The <strong>clock_alarm</strong> 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 
<strong>clock_alarm_reply</strong> server interface.
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.
Only generic errors apply.
<a href="host_get_clock_service.html"><strong>host_get_clock_service</strong></a>,
<a href="clock_get_attributes.html"><strong>clock_get_attributes</strong></a>,
<a href="clock_get_time.html"><strong>clock_get_time</strong></a>,
<a href="clock_sleep.html"><strong>clock_sleep</strong></a>,
<a href="clock_alarm_reply.html"><strong>clock_alarm_reply</strong></a>.
Data Structures:
<a href="tvalspec.html"><strong>tvalspec</strong></a>.