mirror of https://github.com/mkerrisk/man-pages
parent
dac02dc671
commit
f42373f64e
|
@ -25,14 +25,6 @@
|
|||
ualarm \- schedule signal after given number of microseconds
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
/* BSD version */
|
||||
.B "#include <unistd.h>"
|
||||
.sp
|
||||
.BI "unsigned int ualarm(unsigned int " usecs ", unsigned int " interval );
|
||||
.sp
|
||||
/* SUSv2 version */
|
||||
.B "#define _XOPEN_SOURCE 500"
|
||||
.br
|
||||
.B "#include <unistd.h>"
|
||||
.sp
|
||||
.BI "useconds_t ualarm(useconds_t " usecs ", useconds_t " interval );
|
||||
|
@ -46,7 +38,7 @@ The delay may be lengthened slightly by any system activity
|
|||
or by the time spent processing the call or by the
|
||||
granularity of system timers.
|
||||
.LP
|
||||
Unless caught or ignored, this signal will terminate the process.
|
||||
Unless caught or ignored, the SIGALRM signal will terminate the process.
|
||||
.LP
|
||||
If the
|
||||
.I interval
|
||||
|
@ -54,8 +46,8 @@ argument is non-zero, further SIGALRM signals will be sent every
|
|||
.I interval
|
||||
microseconds after the first.
|
||||
.SH "RETURN VALUE"
|
||||
This function returns the number of microseconds remaining from
|
||||
the previous call, or 0 when no alarm is pending.
|
||||
This function returns the number of microseconds remaining for
|
||||
any alarm that was previously set, or 0 if no alarm was pending.
|
||||
.SH ERRORS
|
||||
.TP
|
||||
EINTR
|
||||
|
@ -65,21 +57,24 @@ EINVAL
|
|||
\fIusecs\fP or \fIinterval\fP is not smaller than 1000000.
|
||||
(On systems where that is considered an error.)
|
||||
.SH "CONFORMING TO"
|
||||
4.3BSD, POSIX.1-2001.
|
||||
4.3BSD, SUSv2 and POSIX do not define any errors.
|
||||
4.3BSD, POSIX.1-2001.
|
||||
POSIX.1-2001 marks
|
||||
.BR ualarm ()
|
||||
as obsolete.
|
||||
4.3BSD, SUSv2, and POSIX do not define any errors.
|
||||
.SH NOTES
|
||||
The type
|
||||
.B useconds_t
|
||||
.I useconds_t
|
||||
is an unsigned integer type capable of holding integers
|
||||
in the range [0,1000000].
|
||||
This type is defined by
|
||||
.I <sys/types.h>
|
||||
included by
|
||||
.I <unistd.h>
|
||||
but glibc defines it only when _XOPEN_SOURCE has a value not less than 500,
|
||||
or both _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED are defined.
|
||||
.\" useconds_t also gives problems on HP-UX 10.
|
||||
Programs will be more portable if they never mention this type explicitly.
|
||||
On the original BSD implementation, and in glibc before version 2.1,
|
||||
the arguments to
|
||||
.BR ualarm ()
|
||||
were instead typed as
|
||||
.IR "unsigned int" .
|
||||
Programs will be more portable if they never mention
|
||||
.I useconds_t
|
||||
explicitly.
|
||||
.LP
|
||||
The interaction of this function with
|
||||
other timer functions such as
|
||||
|
@ -96,9 +91,10 @@ other timer functions such as
|
|||
is unspecified.
|
||||
.LP
|
||||
This function is obsolete. Use
|
||||
.BR nanosleep (2)
|
||||
or
|
||||
.BR setitimer (2)
|
||||
or POSIX interval timers
|
||||
.RB ( timer_create (),
|
||||
etc.)
|
||||
instead.
|
||||
.SH "SEE ALSO"
|
||||
.BR alarm (2),
|
||||
|
|
Loading…
Reference in New Issue