minix/man/man3/sleep.3

32 lines
895 B
Groff
Raw Normal View History

2005-05-02 15:01:42 +02:00
.\" 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
.ft B
#include <unistd.h>
unsigned int sleep(unsigned int \fIseconds\fP)
.fi
.SH DESCRIPTION
The current process is suspended from execution for the number
of seconds specified by the argument.
.PP
The routine is implemented by setting an alarm 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"
.BR alarm (2),
.BR pause (2).