<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><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.75.2" /><link rel="home" href="index.html" title="Linux Device Drivers" /><link rel="up" href="ch01.html" title="Chapter 1. Driver Basics" /><link rel="prev" href="re70.html" title="msleep_interruptible" /><link rel="next" href="re71.html" title="ktime_set" /></head><body><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="re70.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Driver Basics</th><td width="20%" align="right"> <a accesskey="n" href="re71.html">Next</a></td></tr></table><hr /></div><div class="sect1" title="High-resolution timers"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2603151"></a>High-resolution timers</h2></div></div></div><div class="toc"><dl><dt><span class="refentrytitle"><a href="re71.html"><span>ktime_set</span></a></span><span class="refpurpose"> — Set a ktime_t variable from a seconds/nanoseconds value </span></dt><dt><span class="refentrytitle"><a href="re72.html"><span>ktime_sub</span></a></span><span class="refpurpose"> — subtract two ktime_t variables </span></dt><dt><span class="refentrytitle"><a href="re73.html"><span>ktime_add</span></a></span><span class="refpurpose"> — add two ktime_t variables </span></dt><dt><span class="refentrytitle"><a href="re74.html"><span>timespec_to_ktime</span></a></span><span class="refpurpose"> — convert a timespec to ktime_t format </span></dt><dt><span class="refentrytitle"><a href="re75.html"><span>timeval_to_ktime</span></a></span><span class="refpurpose"> — convert a timeval to ktime_t format </span></dt><dt><span class="refentrytitle"><a href="re76.html"><span>ktime_to_timespec</span></a></span><span class="refpurpose"> — convert a ktime_t variable to timespec format </span></dt><dt><span class="refentrytitle"><a href="re77.html"><span>ktime_to_timeval</span></a></span><span class="refpurpose"> — convert a ktime_t variable to timeval format </span></dt><dt><span class="refentrytitle"><a href="re78.html"><span>ktime_to_ns</span></a></span><span class="refpurpose"> — convert a ktime_t variable to scalar nanoseconds </span></dt><dt><span class="refentrytitle"><a href="re79.html"><span>ktime_equal</span></a></span><span class="refpurpose"> — Compares two ktime_t variables to see if they are equal </span></dt><dt><span class="refentrytitle"><a href="re80.html"><span>struct hrtimer</span></a></span><span class="refpurpose"> — the basic hrtimer structure </span></dt><dt><span class="refentrytitle"><a href="re81.html"><span>struct hrtimer_sleeper</span></a></span><span class="refpurpose"> — simple sleeper structure </span></dt><dt><span class="refentrytitle"><a href="re82.html"><span>struct hrtimer_clock_base</span></a></span><span class="refpurpose"> — the timer base for a specific clock </span></dt><dt><span class="refentrytitle"><a href="re83.html"><span>ktime_add_ns</span></a></span><span class="refpurpose"> — Add a scalar nanoseconds value to a ktime_t variable </span></dt><dt><span class="refentrytitle"><a href="re84.html"><span>ktime_sub_ns</span></a></span><span class="refpurpose"> — Subtract a scalar nanoseconds value from a ktime_t variable </span></dt><dt><span class="refentrytitle"><a href="re85.html"><span>hrtimer_forward</span></a></span><span class="refpurpose"> — forward the timer expiry </span></dt><dt><span class="refentrytitle"><a href="re86.html"><span>hrtimer_start_range_ns</span></a></span><span class="refpurpose"> — (re)start an hrtimer on the current CPU </span></dt><dt><span class="refentrytitle"><a href="re87.html"><span>hrtimer_start</span></a></span><span class="refpurpose"> — (re)start an hrtimer on the current CPU </span></dt><dt><span class="refentrytitle"><a href="re88.html"><span>hrtimer_try_to_cancel</span></a></span><span class="refpurpose"> — try to deactivate a timer </span></dt><dt><span class="refentrytitle"><a href="re89.html"><span>hrtimer_cancel</span></a></span><span class="refpurpose"> — cancel a timer and wait for the handler to finish. </span></dt><dt><span class="refentrytitle"><a href="re90.html"><span>hrtimer_get_remaining</span></a></span><span class="refpurpose"> — get remaining time for the timer </span></dt><dt><span class="refentrytitle"><a href="re91.html"><span>hrtimer_init</span></a></span><span class="refpurpose"> — initialize a timer to the given clock </span></dt><dt><span class="refentrytitle"><a href="re92.html"><span>hrtimer_get_res</span></a></span><span class="refpurpose"> — get the timer resolution for a clock </span></dt><dt><span class="refentrytitle"><a href="re93.html"><span>schedule_hrtimeout_range</span></a></span><span class="refpurpose"> — sleep until timeout </span></dt><dt><span class="refentrytitle"><a href="re94.html"><span>schedule_hrtimeout</span></a></span><span class="refpurpose"> — sleep until timeout </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="re70.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re71.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>msleep_interruptible</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>ktime_set</span></td></tr></table></div></body></html>