1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>hrtimer_forward_now</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="ch01s05.html" title="High-resolution timers"><link rel="prev" href="API-hrtimer-start.html" title="hrtimer_start"><link rel="next" href="API-hrtimer-forward.html" title="hrtimer_forward"></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"><span class="phrase">hrtimer_forward_now</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-hrtimer-start.html">Prev</a> </td><th width="60%" align="center">High-resolution timers</th><td width="20%" align="right"> <a accesskey="n" href="API-hrtimer-forward.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-hrtimer-forward-now"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hrtimer_forward_now — 2 forward the timer expiry so it expires after now 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">u64 <b class="fsfunc">hrtimer_forward_now </b>(</code></td><td><a class="link" href="API-struct-hrtimer.html" title="struct hrtimer">struct hrtimer</a> * <var class="pdparam">timer</var>, </td></tr><tr><td> </td><td>ktime_t <var class="pdparam">interval</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.3.6.13.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>timer</code></em></span></dt><dd><p> 4 hrtimer to forward 5 </p></dd><dt><span class="term"><em class="parameter"><code>interval</code></em></span></dt><dd><p> 6 the interval to forward 7 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.3.6.13.6"></a><h2>Description</h2><p> 8 Forward the timer expiry so it will expire after the current time 9 of the hrtimer clock base. Returns the number of overruns. 10 </p><p> 11 12 Can be safely called from the callback function of <em class="parameter"><code>timer</code></em>. If 13 called from other contexts <em class="parameter"><code>timer</code></em> must neither be enqueued nor 14 running the callback and the caller needs to take care of 15 serialization. 16</p></div><div class="refsect1"><a name="id-1.3.6.13.7"></a><h2>Note</h2><p> 17 This only updates the timer expiry value and does not requeue 18 the timer. 19</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-hrtimer-start.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01s05.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-hrtimer-forward.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">hrtimer_start</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">hrtimer_forward</span></td></tr></table></div></body></html> 20