![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| nanosleep returns prematurely, with return value 0 | MeMyself | High Level Programming | 1 | 12-21-2008 11:22 PM |
| nanosleep | ameya | High Level Programming | 2 | 03-08-2005 01:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Where is nanosleep?
I use nanosleep under solaris10,like follows:
Code:
#include <pthread.h>
#include <time.h>
#include <sys/time.h>
struct to_info{
void (*to_fn)(void *);
void *to_arg;
struct timespec to_wait;
};
void *timeout_helper(void *arg){
struct to_info *tip;
nanosleep(&tip->to_wait,NULL);
}
undefined:nanosleep Why? Which header file include nanosleep function? How to find this header file? thanks Last edited by pludi; 3 Weeks Ago at 02:19 AM.. Reason: code tags, please... |
|
|||||
|
See: nanosleep(3RT)high resolution sleep (man pages section 3: Realtime Library Functions)
You have the right header file. You also need the right library. That is why the -lrt is in bold at the top of the page. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|