File:  [CSRG BSD Unix] / 43BSDReno / lib / libc / gen / sleep.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

.\" Copyright (c) 1980 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)sleep.3	6.2 (Berkeley) 5/12/86
.\"
.TH SLEEP 3  "May 12, 1986"
.UC 4
.SH NAME
sleep \- suspend execution for interval
.SH SYNOPSIS
.nf
.B sleep(seconds)
.B unsigned seconds;
.fi
.SH DESCRIPTION
The current process is suspended from execution for the number
of seconds specified by the argument.
The actual suspension time may be up to 1 second less than
that requested, because scheduled wakeups occur at fixed 1-second intervals,
and an arbitrary amount longer because of other activity
in the system.
.PP
The routine is implemented by setting an interval timer
and pausing until it occurs.
The previous state of this timer is saved and restored.
If the sleep time exceeds the time to the expiration of the
previous timer,
the process sleeps only until the signal would have occurred, and the
signal is sent 1 second later.
.SH "SEE ALSO"
setitimer(2), sigpause(2), usleep(3)

unix.superglobalmegacorp.com

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