Files
2024-02-19 00:21:47 -05:00

156 lines
5.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
<title>ualarm</title>
</head>
<body bgcolor="white">
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
</script>
<basefont size="3"> <a name="ualarm"></a> <a name="tag_03_796"></a><!-- ualarm -->
<!--header start-->
<center><font size="2">The Open Group Base Specifications Issue 6<br>
IEEE Std 1003.1-2001<br>
Copyright &copy; 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
<!--header end-->
<hr size="2" noshade>
<h4><a name="tag_03_796_01"></a>NAME</h4>
<blockquote>ualarm - set the interval timer</blockquote>
<h4><a name="tag_03_796_02"></a>SYNOPSIS</h4>
<blockquote class="synopsis">
<div class="box"><code><tt><sup>[<a href="javascript:open_code('OB XSI')">OB XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
"[Option Start]" border="0"> #include &lt;<a href="../basedefs/unistd.h.html">unistd.h</a>&gt;<br>
<br>
useconds_t ualarm(useconds_t</tt> <i>useconds</i><tt>, useconds_t</tt> <i>interval</i><tt>); <img src="../images/opt-end.gif" alt=
"[Option End]" border="0"></tt></code></div>
<tt><br>
</tt></blockquote>
<h4><a name="tag_03_796_03"></a>DESCRIPTION</h4>
<blockquote>
<p>The <i>ualarm</i>() function shall cause the SIGALRM signal to be generated for the calling process after the number of realtime
microseconds specified by the <i>useconds</i> argument has elapsed. When the <i>interval</i> argument is non-zero, repeated timeout
notification occurs with a period in microseconds specified by the <i>interval</i> argument. If the notification signal, SIGALRM,
is not caught or ignored, the calling process is terminated.</p>
<p>Implementations may place limitations on the granularity of timer values. For each interval timer, if the requested timer value
requires a finer granularity than the implementation supports, the actual timer value shall be rounded up to the next supported
value.</p>
<p>Interactions between <i>ualarm</i>() and any of the following are unspecified:</p>
<blockquote>
<pre>
<a href="../functions/alarm.html"><i>alarm</i>()</a>
<a href="../functions/nanosleep.html"><i>nanosleep</i>()</a>
<a href="../functions/setitimer.html"><i>setitimer</i>()</a>
<a href="../functions/timer_create.html"><i>timer_create</i>()</a>
<a href="../functions/timer_delete.html"><i>timer_delete</i>()</a>
<a href="../functions/timer_getoverrun.html"><i>timer_getoverrun</i>()</a>
<a href="../functions/timer_gettime.html"><i>timer_gettime</i>()</a>
<a href="../functions/timer_settime.html"><i>timer_settime</i>()</a>
<a href="../functions/sleep.html"><i>sleep</i>()</a>
</pre>
</blockquote>
</blockquote>
<h4><a name="tag_03_796_04"></a>RETURN VALUE</h4>
<blockquote>
<p>The <i>ualarm</i>() function shall return 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>() shall return 0.</p>
</blockquote>
<h4><a name="tag_03_796_05"></a>ERRORS</h4>
<blockquote>
<p>No errors are defined.</p>
</blockquote>
<hr>
<div class="box"><em>The following sections are informative.</em></div>
<h4><a name="tag_03_796_06"></a>EXAMPLES</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_796_07"></a>APPLICATION USAGE</h4>
<blockquote>
<p>Applications are recommended to use <a href="../functions/nanosleep.html"><i>nanosleep</i>()</a> if the Timers option is
supported, or <a href="../functions/setitimer.html"><i>setitimer</i>()</a>, <a href=
"../functions/timer_create.html"><i>timer_create</i>()</a>, <a href="../functions/timer_delete.html"><i>timer_delete</i>()</a>, <a
href="../functions/timer_getoverrun.html"><i>timer_getoverrun</i>()</a>, <a href=
"../functions/timer_gettime.html"><i>timer_gettime</i>()</a>, or <a href=
"../functions/timer_settime.html"><i>timer_settime</i>()</a> instead of this function.</p>
</blockquote>
<h4><a name="tag_03_796_08"></a>RATIONALE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_796_09"></a>FUTURE DIRECTIONS</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_03_796_10"></a>SEE ALSO</h4>
<blockquote>
<p><a href="alarm.html"><i>alarm</i>()</a> , <a href="nanosleep.html"><i>nanosleep</i>()</a> , <a href=
"setitimer.html"><i>setitimer</i>()</a> , <a href="sleep.html"><i>sleep</i>()</a> , <a href=
"timer_create.html"><i>timer_create</i>()</a> , <a href="timer_delete.html"><i>timer_delete</i>()</a> , <a href=
"timer_getoverrun.html"><i>timer_getoverrun</i>()</a> , the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href=
"../basedefs/unistd.h.html"><i>&lt;unistd.h&gt;</i></a></p>
</blockquote>
<h4><a name="tag_03_796_11"></a>CHANGE HISTORY</h4>
<blockquote>
<p>First released in Issue 4, Version 2.</p>
</blockquote>
<h4><a name="tag_03_796_12"></a>Issue 5</h4>
<blockquote>
<p>Moved from X/OPEN UNIX extension to BASE.</p>
</blockquote>
<h4><a name="tag_03_796_13"></a>Issue 6</h4>
<blockquote>
<p>This function is marked obsolescent.</p>
</blockquote>
<div class="box"><em>End of informative text.</em></div>
<hr>
<hr size="2" noshade>
<center><font size="2"><!--footer start-->
UNIX &reg; is a registered Trademark of The Open Group.<br>
POSIX &reg; is a registered Trademark of The IEEE.<br>
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
]</font></center>
<!--footer end-->
<hr size="2" noshade>
</body>
</html>