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