ualarm.html

来自「unix 下的C开发手册,还用详细的例程。」· HTML 代码 · 共 95 行

HTML
95
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>ualarm</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_010_208">&nbsp;</a>NAME</h4><blockquote>ualarm - set the interval timer</blockquote><h4><a name = "tag_000_010_209">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="unistd.h.html">unistd.h</a>&gt;useconds_t ualarm(useconds_t <i>useconds</i>, useconds_t <i>interval</i>);</code></pre></blockquote><h4><a name = "tag_000_010_210">&nbsp;</a>DESCRIPTION</h4><blockquote><br>The<i>ualarm()</i>function causes the SIGALRM signal to be generated for the calling processafter the number of real-time microseconds specified by the <i>useconds</i>argument has elapsed.  When the <i>interval</i> argument is non-zero, repeatedtimeout notification occurs with a period in microseconds specified by the<i>interval</i> argument.  If the notification signal, SIGALRM, is not caughtor ignored, the calling process is terminated.<p>Implementations may place limitations on the granularity of timer values.For each interval timer, if the requested timer value requires a finergranularity than the implementation supports, the actual timer value will berounded up to the next supported value.<p>Interactions between<i>ualarm()</i>and any of the following are unspecified:<p><i><a href="alarm.html">alarm()</a></i><pre><i><a href="nanosleep.html">nanosleep()</a></i><i><a href="setitimer.html">setitimer()</a></i><i><a href="timer_create.html">timer_create()</a></i><i><a href="timer_delete.html">timer_delete()</a></i><i><a href="timer_getoverrun.html">timer_getoverrun()</a></i><i><a href="timer_gettime.html">timer_gettime()</a></i><i><a href="timer_settime.html">timer_settime()</a></i><i><a href="sleep.html">sleep()</a></i></pre></blockquote><h4><a name = "tag_000_010_211">&nbsp;</a>RETURN VALUE</h4><blockquote>The<i>ualarm()</i>function returns the number of microseconds remaining from the previous<i>ualarm()</i>call.  If no timeouts are pending or if<i>ualarm()</i>has not previously been called,<i>ualarm()</i>returns 0.</blockquote><h4><a name = "tag_000_010_212">&nbsp;</a>ERRORS</h4><blockquote>No errors are defined.</blockquote><h4><a name = "tag_000_010_213">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_214">&nbsp;</a>APPLICATION USAGE</h4><blockquote>The<i>ualarm()</i>function is a simplified interface to<i><a href="setitimer.html">setitimer()</a></i>,and uses the ITIMER_REAL interval timer.</blockquote><h4><a name = "tag_000_010_215">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_010_216">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="alarm.html">alarm()</a></i>,<i><a href="nanosleep.html">nanosleep()</a></i>,<i><a href="setitimer.html">setitimer()</a></i>,<i><a href="sleep.html">sleep()</a></i>,<i><a href="timer_create.html">timer_create()</a></i>,<i><a href="timer_delete.html">timer_delete()</a></i>,<i><a href="timer_getoverrun.html">timer_getoverrun()</a></i>,<i><a href="timer_gettime.html">timer_gettime()</a></i>,<i><a href="timer_settime.html">timer_settime()</a></i><i><a href="unistd.h.html">&lt;unistd.h&gt;</a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?