summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-04-25 14:48:00 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-04-25 14:48:00 +0000
commitc08d50f5edc8557c7dbb4b4f8a075f9acbf9842b (patch)
tree27cfa62b2f5283d642e5da52ecbf4ff30e896bb7 /lib
parentb5d6b3537a898576cae2535e3260d6d2d5324525 (diff)
less inaccurate
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/usleep.331
1 files changed, 12 insertions, 19 deletions
diff --git a/lib/libc/gen/usleep.3 b/lib/libc/gen/usleep.3
index 97cfa2adc6e..b8ff9be759f 100644
--- a/lib/libc/gen/usleep.3
+++ b/lib/libc/gen/usleep.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: usleep.3,v 1.2 1996/08/19 08:27:18 tholo Exp $
+.\" $OpenBSD: usleep.3,v 1.3 1997/04/25 14:47:59 kstailey Exp $
.\"
.\" Copyright (c) 1986, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -52,32 +52,25 @@ of time.
System activity or time spent in processing the
call may lengthen the sleep slightly.
.Pp
-If a timer is already running on the process its state is saved.
-If the value
-.Fa microseconds
-is more than or equal to the remaining clock time for the saved timer,
-the sleep time is set to
-the remaining clock time.
-The state of the previous timer
-is restored after
-.Fa microseconds
-has passed.
-.Pp
This routine is implemented using
-.Xr setitimer 2 ;
-it requires eight system calls each time it is invoked.
+.Xr nanosleep 2 ;
+it requires one system call each time it is invoked.
A similar but less compatible function can be obtained with a single
.Xr select 2 ;
-such a function would not restart after signals, but would not interfere
+such a function would not restart after signals, and also does not interfere
with other uses of
-.Xr setitimer .
+.Xr setitimer
+(not that
+.Fn usleep
+interferes with interval timers anymore.)
.Sh SEE ALSO
-.Xr setitimer 2 ,
.Xr getitimer 2 ,
+.Xr nanosleep 2 ,
+.Xr setitimer 2 ,
.Xr sigpause 2 ,
-.Xr ualarm 3 ,
-.Xr sleep 3 ,
.Xr alarm 3
+.Xr sleep 3 ,
+.Xr ualarm 3 ,
.Sh HISTORY
The
.Fn usleep