Annotation of 43BSDReno/lib/libc/gen/usleep.3, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1980 Regents of the University of California.
                      2: .\" All rights reserved.  The Berkeley software License Agreement
                      3: .\" specifies the terms and conditions for redistribution.
                      4: .\"
                      5: .\"    @(#)@(#)usleep.3        6.3 (Berkeley) 5/15/86
                      6: .\"
                      7: .TH USLEEP 3  "May 15, 1986"
                      8: .UC 6
                      9: .SH NAME
                     10: usleep \- suspend execution for interval
                     11: .SH SYNOPSIS
                     12: .nf
                     13: .B usleep(useconds)
                     14: .B unsigned useconds;
                     15: .fi
                     16: .SH DESCRIPTION
                     17: The current process is suspended from execution for the number
                     18: of microseconds specified by the argument.
                     19: The actual suspension time may be an arbitrary amount longer
                     20: because of other activity in the system
                     21: or because of the time spent in processing the call.
                     22: .PP
                     23: The routine is implemented by setting an interval timer
                     24: and pausing until it occurs.
                     25: The previous state of this timer is saved and restored.
                     26: If the sleep time exceeds the time to the expiration of the
                     27: previous timer,
                     28: the process sleeps only until the signal would have occurred, and the
                     29: signal is sent a short time later.
                     30: .PP
                     31: This routine is implemented using 
                     32: .IR setitimer (2);
                     33: it requires eight system calls each time it is invoked.
                     34: A similar but less compatible function can be obtained with a single
                     35: .IR select (2);
                     36: it would not restart after signals, but would not interfere
                     37: with other uses of
                     38: .IR setitimer . 
                     39: .SH "SEE ALSO"
                     40: setitimer(2), getitimer(2), sigpause(2), ualarm(3), sleep(3), alarm(3)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.