Sponsored Content
Top Forums Programming Introducing Delay less then a second. Post 52204 by Russell on Monday 14th of June 2004 03:00:18 AM
Old 06-14-2004
Code:
shell% man nanosleep

 

3 More Discussions You Might Find Interesting

1. What is on Your Mind?

Introducing myself... :D

Hey guys, I am Shelby! :-) I am 13 years old and i love Unix. When i was about 6 i was introduced to computers, because almost all of my family is comprised of artists, i used macs at a very early age. I generally sat on the computer until the time i was about 10 when i walked into a laptop store... (2 Replies)
Discussion started by: mesaynaysayer
2 Replies

2. Programming

Introducing a new project for AI lovers

Hi guys, I'm the maintainer of Imperfect world of Robots, and I'm here to introduce this project to any AI lover. This is a free (as in freedom) software and release under the terms of GNU General Public License. Although it belongs to the programming game category, it's not only about... (0 Replies)
Discussion started by: aidin_36
0 Replies

3. What is on Your Mind?

Introducing Myself.

Hello! I didn't see an Introduce Yourself/Meet and Greet board, so I think this might be the right place. I'm a student and a new coder. I run Ubuntu 11.10 currently, and I program in Python, and I'm learning a few languages alongside. Random pages: Twitter - @NihilusV, other links can... (1 Reply)
Discussion started by: NihilusV
1 Replies
NANOSLEEP(2)						      BSD System Calls Manual						      NANOSLEEP(2)

NAME
nanosleep -- suspend thread execution for an interval measured in nanoseconds LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <time.h> int nanosleep(const struct timespec *rqtp, struct timespec *rmtp); DESCRIPTION
The nanosleep() function causes the calling thread to sleep for the amount of time specified in rqtp (the actual time slept may be longer, due to system latencies and possible limitations in the timer resolution of the hardware). An unmasked signal will cause nanosleep() to ter- minate the sleep early, regardless of the SA_RESTART value on the interrupting signal. RETURN VALUES
If nanosleep() returns because the requested time has elapsed, the value returned will be zero. If nanosleep() returns due to the delivery of a signal, the value returned will be the -1, and the global variable errno will be set to indi- cate the interruption. If rmtp is non-NULL, the timespec structure it references is updated to contain the unslept amount (the request time minus the time actually slept). ERRORS
The nanosleep() call fails if: [EINTR] nanosleep() was interrupted by the delivery of a signal. [EINVAL] rqtp specified a nanosecond value less than zero or greater than or equal to 1000 million. SEE ALSO
sigsuspend(2), sleep(3) STANDARDS
The nanosleep() function conforms to IEEE Std 1003.1b-1993 (``POSIX.1''). BSD
April 17, 1997 BSD
All times are GMT -4. The time now is 09:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy