icon Top 9 categories map      RocketAware > man pages >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Others

NANOSLEEP(2)              OpenBSD Programmer's Manual             NANOSLEEP(2)

     nanosleep - high resolution sleep

     #include <time.h>

     nanosleep(const struct timespec *rqtp, struct timespec *rmtp);

     nanosleep() suspends execution of the calling process for the time speci-
     fied. An unmasked signal will cause it to terminate the sleep early, re-
     gardless of the SA_RESTART value on the interrupting signal.

     If the nanosleep() function returns because the requested time has
     elapsed, the value returned will be zero.

     If the nanosleep() function returns due to the delivery of a signal, the
     value returned will be the -1, and the global variable errno will be set
     to indicate the interruption.  If rmtp is non-null, the timespec struc-
     ture it references is updated to contain the unslept amount (the request
     time minus the time actually slept).

     If any of the following conditions occur, the nanosleep() function shall
     return -1 and set errno to the corresponding value.

     [EFAULT]      Either rqtp or rmtp points to memory that is not a valid
                   part of the process address space.

     [EINTR]       nanosleep was interrupted by the delivery of a signal.

     [EINVAL]      rqtp specified a nanosecond value less than zero or greater
                   than 1000 million.

     [ENOSYS]      nanosleep is not supported by this implementation.


     The nanosleep() function conforms to IEEE Std1003.1b-1993 (``POSIX'').

OpenBSD 2.6                     April 17, 1997                               1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]

[Overview Topics]

Up to: Real-Time related - time of day, elapsed time, sleeping, waiting for events. time(), gmtime(), localtime(), etc.
Up to: Process Signals and Events - Sending and handling signals and events.
Up to: Current Process Control - control of the currently running process, longjmp, wait, sleep, argument processing

RocketLink!--> Man page versions: OpenBSD FreeBSD RedHat Others

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > nanosleep.2/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments