]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/host_get_clock_service.html
xnu-3789.1.32.tar.gz
[apple/xnu.git] / osfmk / man / host_get_clock_service.html
CommitLineData
13fec989
A
1<h2>host_get_clock_service</h2>
2<hr>
3<p>
4<strong>Function</strong> - Return a send right to a kernel clock's service port.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t host_get_clock_service</strong>
8 <strong>(host_t</strong> <var>host</var>,
9 <strong>clock_id_t</strong> <var>id</var>,
10 <strong>clock_t</strong> <var>clock_name</var><strong>);</strong>
11</pre>
12<h3>PARAMETERS</h3>
13<dl>
14<p>
15<dt> <var>host</var>
16<dd>
17[in host-name send right]
18The name (or control) port for the host
19owning the clock.
20<p>
21<dt> <var>id</var>
22<dd>
23[in scalar]
24The identification of the desired kernel clock. These values
25are defined in \*L<mach/clock_types.h>\*O. Although an implementation
26may define additional values, the following values are always defined
27(although only the REALTIME clock is required to be implemented):
28<dl>
29<p>
30<dt> <strong>REALTIME_CLOCK</strong>
31<dd>
32A moderate resolution clock service that (typically) tracks
33time since the system last boot.
34<p>
35<dt> <strong>BATTERY_CLOCK</strong>
36<dd>
37A (typically) low resolution clock (to the second) that
38survives power failures or service outages.
39<p>
40<dt> <strong>HIGHRES_CLOCK</strong>
41<dd>
42A high resolution clock.
43</dl>
44<p>
45<dt> <var>clock_name</var>
46<dd>
47[out clock-name send right]
48Name port for the clock.
49</dl>
50<h3>DESCRIPTION</h3>
51<p>
52The <strong>host_get_clock_service</strong> function returns a send
53right to the name port for a
54kernel clock object. This right is used to get the time and
55resolutions of the
56clock and to set clock alarms.
57<h3>RETURN VALUES</h3>
58<p>
59Only generic errors apply.
60<h3>RELATED INFORMATION</h3>
61<p>
62Functions:
63<a href="clock_get_time.html"><strong>clock_get_time</strong></a>,
64<a href="clock_get_attributes.html"><strong>clock_get_attributes</strong></a>,
65<a href="clock_map_time.html"><strong>clock_map_time</strong></a>,
66<a href="clock_sleep.html"><strong>clock_sleep</strong></a>,
67<a href="clock_alarm.html"><strong>clock_alarm</strong></a>,
68<a href="host_get_clock_control.html"><strong>host_get_clock_control</strong></a>.