xref: /xnu-8020.121.3/osfmk/man/clock_get_time.html (revision fdd8201d7b966f0c3ea610489d29bd841d358941)
1*fdd8201dSApple OSS Distributions<h2>clock_get_time</h2>
2*fdd8201dSApple OSS Distributions<hr>
3*fdd8201dSApple OSS Distributions<p>
4*fdd8201dSApple OSS Distributions<strong>Function</strong> - Return the current time.
5*fdd8201dSApple OSS Distributions<h3>SYNOPSIS</h3>
6*fdd8201dSApple OSS Distributions<pre>
7*fdd8201dSApple OSS Distributions<strong>kern_return_t   clock_get_time</strong>
8*fdd8201dSApple OSS Distributions                <strong>(clock_t</strong>                             <var>clock_name</var>,
9*fdd8201dSApple OSS Distributions                 <strong>tvalspec_t</strong>                            <var>cur_time</var><strong>);</strong>
10*fdd8201dSApple OSS Distributions</pre>
11*fdd8201dSApple OSS Distributions<h3>PARAMETERS</h3>
12*fdd8201dSApple OSS Distributions<dl>
13*fdd8201dSApple OSS Distributions<p>
14*fdd8201dSApple OSS Distributions<dt> <var>clock_name</var>
15*fdd8201dSApple OSS Distributions<dd>
16*fdd8201dSApple OSS Distributions[in clock-name send right]
17*fdd8201dSApple OSS DistributionsThe name (or control) port for the clock.
18*fdd8201dSApple OSS Distributions<p>
19*fdd8201dSApple OSS Distributions<dt> <var>cur_time</var>
20*fdd8201dSApple OSS Distributions<dd>
21*fdd8201dSApple OSS Distributions[out structure]
22*fdd8201dSApple OSS DistributionsCurrent time
23*fdd8201dSApple OSS Distributions</dl>
24*fdd8201dSApple OSS Distributions<h3>DESCRIPTION</h3>
25*fdd8201dSApple OSS Distributions<p>
26*fdd8201dSApple OSS DistributionsThe <strong>clock_get_time</strong> function returns the current time
27*fdd8201dSApple OSS Distributionskept by a clock.  The
28*fdd8201dSApple OSS Distributionsvalue returned is a monotonically increasing value (unless tampered
29*fdd8201dSApple OSS Distributionswith via the
30*fdd8201dSApple OSS Distributions<strong>clock_set_time</strong> function).
31*fdd8201dSApple OSS Distributions<h3>RETURN VALUES</h3>
32*fdd8201dSApple OSS Distributions<p>
33*fdd8201dSApple OSS DistributionsOnly generic errors apply.
34*fdd8201dSApple OSS Distributions<h3>RELATED INFORMATION</h3>
35*fdd8201dSApple OSS Distributions<p>
36*fdd8201dSApple OSS DistributionsFunctions:
37*fdd8201dSApple OSS Distributions<a href="host_get_clock_service.html"><strong>host_get_clock_service</strong></a>,
38*fdd8201dSApple OSS Distributions<a href="clock_get_attributes.html"><strong>clock_get_attributes</strong></a>,
39*fdd8201dSApple OSS Distributions<a href="clock_map_time.html"><strong>clock_map_time</strong></a>,
40*fdd8201dSApple OSS Distributions<a href="clock_sleep.html"><strong>clock_sleep</strong></a>,
41*fdd8201dSApple OSS Distributions<a href="clock_alarm.html"><strong>clock_alarm</strong></a>,
42*fdd8201dSApple OSS Distributions<a href="clock_set_time.html"><strong>clock_set_time</strong></a>.
43*fdd8201dSApple OSS Distributions<p>
44*fdd8201dSApple OSS DistributionsData Structures:
45*fdd8201dSApple OSS Distributions<a href="tvalspec.html"><strong>tvalspec</strong></a>.
46