Web Hosting Directory | Web Hosting Resources | Webmaster Resources | Domain Tools | Search Engine Marketing | Forums
  Signup
Today: 395   Yesterday: 1,557   Max: 1,872   Total: 377,670   Current Users : 14 (Member 0) 
DOMAIN TOOLS

WEBMASTER TOOLS

RELATED ARTICLES

SUBMIT AN ARTICLE

Write for us and get publicity, link to your website, and best of all get paid. Please visit our writers page for details.


LINK TO US

Link to us and earn points for each visitor you bring to us. Please visit our link partner page for details.

 
Search Linux manpages For:  

clock_nanosleep(2) -- Linux man page

 

NAME

clock_nanosleep - Suspend execution of the currently running thread  

SYNOPSIS

long sys_clock_nanosleep (clockid_t which_clock, int flags, const struct timespec *rqtp, struct timespec *rmtp);
 

DESCRIPTION

clock_nanosleep suspends execution of the currently running thread until the time interval specified by rqtp is elapsed, or until the function is woken up by a signal. The rmtp is updated with the amount of time remaining in the time interval (requested minus sleep time) if non-null. If null, the rmtp argument does not return any remaining time information.

The flags parameter specifies the type of behavior the call will take. So far, the only value defined for this parameter (defined in include/linux.time.h is TIMER_ABSTIME). This value causes the current thread to be suspended from execution in three ways:

1.
Until either the time value of the clock specified by clock_id reaches the absolute time specified by the rqtp argument.
2.
Until a signal is delivered to the calling thread and its action is to invoke a signal-catching function.
3.
Until the process is terminated.

The values that clockid_t currently supports for POSIX.1b timers (defined in include/linux/time.h) are:

CLOCK_REALTIME
Systemwide realtime clock.
CLOCK_MONOTONIC
Represents monotonic time. Cannot be set.
CLOCK_PROCESS_CPUTIME_ID
High resolution per-process timer.
CLOCK_THREAD_CPUTIME_ID
Thread-specific timer.
CLOCK_REALTIME_HR
High resolution version of CLOCK_REALTIME.
CLOCK_MONOTONIC_HR
High resolution version of CLOCK_MONOTONIC.
 

RETURN VALUE

clock_nanosleep returns 0 if the time specified by rqtp has elapsed; otherwise, it returns one of the errors listed in the "Errors" section.  

ERRORS

-EINVAL
An invalid which_clock value or an invalid rqtp was specified.
-EFAULT
The value was could not be copied to the rmtp or an invalid rqtp value was specified.
 

SEE ALSO

clock_getres(2), clock_gettime(2), clock_settime(2)  

AUTHOR

Niki Rahimi


 
 
What is your major source of website traffic?
 
 
 
 
 
 

ADVERTISEMENT

 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2008 Broadband Media, Inc. All rights reserved.