1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>High-resolution timers</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="Basics.html" title="Chapter&#160;1.&#160;Driver Basics"><link rel="prev" href="API-wake-up-atomic-t.html" title="wake_up_atomic_t"><link rel="next" href="API-ktime-set.html" title="ktime_set"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">High-resolution timers</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-wake-up-atomic-t.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;1.&#160;Driver Basics</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-ktime-set.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="idp1107479700"></a>High-resolution timers</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="refentrytitle"><a href="API-ktime-set.html"><span class="phrase">ktime_set</span></a></span><span class="refpurpose"> &#8212; 
2  Set a ktime_t variable from a seconds/nanoseconds value
3 </span></dt><dt><span class="refentrytitle"><a href="API-ktime-equal.html"><span class="phrase">ktime_equal</span></a></span><span class="refpurpose"> &#8212; 
4     Compares two ktime_t variables to see if they are equal
5 </span></dt><dt><span class="refentrytitle"><a href="API-ktime-compare.html"><span class="phrase">ktime_compare</span></a></span><span class="refpurpose"> &#8212; 
6     Compares two ktime_t variables for less, greater or equal
7 </span></dt><dt><span class="refentrytitle"><a href="API-ktime-after.html"><span class="phrase">ktime_after</span></a></span><span class="refpurpose"> &#8212; 
8     Compare if a ktime_t value is bigger than another one.
9 </span></dt><dt><span class="refentrytitle"><a href="API-ktime-before.html"><span class="phrase">ktime_before</span></a></span><span class="refpurpose"> &#8212; 
10     Compare if a ktime_t value is smaller than another one.
11 </span></dt><dt><span class="refentrytitle"><a href="API-ktime-to-timespec-cond.html"><span class="phrase">ktime_to_timespec_cond</span></a></span><span class="refpurpose"> &#8212; 
12     convert a ktime_t variable to timespec format only if the variable contains data
13 </span></dt><dt><span class="refentrytitle"><a href="API-ktime-to-timespec64-cond.html"><span class="phrase">ktime_to_timespec64_cond</span></a></span><span class="refpurpose"> &#8212; 
14     convert a ktime_t variable to timespec64 format only if the variable contains data
15 </span></dt><dt><span class="refentrytitle"><a href="API-struct-hrtimer.html"><span class="phrase">struct hrtimer</span></a></span><span class="refpurpose"> &#8212; 
16  the basic hrtimer structure
17 </span></dt><dt><span class="refentrytitle"><a href="API-struct-hrtimer-sleeper.html"><span class="phrase">struct hrtimer_sleeper</span></a></span><span class="refpurpose"> &#8212; 
18     simple sleeper structure
19 </span></dt><dt><span class="refentrytitle"><a href="API-struct-hrtimer-clock-base.html"><span class="phrase">struct hrtimer_clock_base</span></a></span><span class="refpurpose"> &#8212; 
20     the timer base for a specific clock
21 </span></dt><dt><span class="refentrytitle"><a href="API-hrtimer-forward.html"><span class="phrase">hrtimer_forward</span></a></span><span class="refpurpose"> &#8212; 
22  forward the timer expiry
23 </span></dt><dt><span class="refentrytitle"><a href="API-hrtimer-start-range-ns.html"><span class="phrase">hrtimer_start_range_ns</span></a></span><span class="refpurpose"> &#8212; 
24     (re)start an hrtimer on the current CPU
25 </span></dt><dt><span class="refentrytitle"><a href="API-hrtimer-start.html"><span class="phrase">hrtimer_start</span></a></span><span class="refpurpose"> &#8212; 
26     (re)start an hrtimer on the current CPU
27 </span></dt><dt><span class="refentrytitle"><a href="API-hrtimer-try-to-cancel.html"><span class="phrase">hrtimer_try_to_cancel</span></a></span><span class="refpurpose"> &#8212; 
28     try to deactivate a timer
29 </span></dt><dt><span class="refentrytitle"><a href="API-hrtimer-cancel.html"><span class="phrase">hrtimer_cancel</span></a></span><span class="refpurpose"> &#8212; 
30     cancel a timer and wait for the handler to finish.
31 </span></dt><dt><span class="refentrytitle"><a href="API-hrtimer-get-remaining.html"><span class="phrase">hrtimer_get_remaining</span></a></span><span class="refpurpose"> &#8212; 
32     get remaining time for the timer
33 </span></dt><dt><span class="refentrytitle"><a href="API-hrtimer-init.html"><span class="phrase">hrtimer_init</span></a></span><span class="refpurpose"> &#8212; 
34     initialize a timer to the given clock
35 </span></dt><dt><span class="refentrytitle"><a href="API-hrtimer-get-res.html"><span class="phrase">hrtimer_get_res</span></a></span><span class="refpurpose"> &#8212; 
36     get the timer resolution for a clock
37 </span></dt><dt><span class="refentrytitle"><a href="API-schedule-hrtimeout-range.html"><span class="phrase">schedule_hrtimeout_range</span></a></span><span class="refpurpose"> &#8212; 
38     sleep until timeout
39 </span></dt><dt><span class="refentrytitle"><a href="API-schedule-hrtimeout.html"><span class="phrase">schedule_hrtimeout</span></a></span><span class="refpurpose"> &#8212; 
40     sleep until timeout
41 </span></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-wake-up-atomic-t.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="Basics.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-ktime-set.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">wake_up_atomic_t</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">ktime_set</span></td></tr></table></div></body></html>
42