From: werme@alingo.zk3.dec.com (Eric Werme)
Subject: Re: nanosleep on DEC3000 for OSF/1 v3.0
Date: 1995/10/13 [thread overview]
Message-ID: <werme.813613145@alingo.zk3.dec.com> (raw)
In-Reply-To: 45h6k9$pm4@hammer.msfc.nasa.gov
hintze@mohave.NoSubdomain.NoDomain (Geoffrey C. Hintze) writes:
> I tried the nanosleep
>function (which was nanosleep_d9 in the library) but it returned a -1
>and an errno of 78 (which means the function is not implemented). Does
>anyone have any suggestions?
Try usleep:
usleep(3) usleep(3)
NAME
usleep - Suspends execution for an interval
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
void usleep(
unsigned mseconds );
PARAMETERS
mseconds The number of microseconds to suspend execution for.
DESCRIPTION
The usleep() function suspends the current process from execution for the
number of microseconds specified by the mseconds parameter. Because of
other activity in the system, or because of the time spent in processing
the call, the actual suspension time may be longer than specified.
The usleep() function sets an interval timer and pauses until it expires.
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 a
short time later.
The usleep() function uses the setitimer() function. It requires eight
system calls each time it is invoked. A similar but less compatible func-
tion can be obtained with a single select; it would not restart after sig-
nals, but would not interfere with other uses of setitimer().
RELATED INFORMATION
Functions: alarm(3), getitimer(2), sigaction(2), sigvec(2), sleep(3)
--
Eric (Ric) Werme | werme@zk3.dec.com
Digital Equipment Corp. | This space intentionally left blank.
next prev parent reply other threads:[~1995-10-13 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-10-11 4:00 nanosleep on DEC3000 for OSF/1 v3.0 Geoffrey C. Hintze
1995-10-12 4:00 ` Brian Field
1995-10-13 4:00 ` Eric Werme [this message]
1995-10-13 4:00 ` Jeffrey Mogul
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox