Where is nanosleep?

I use nanosleep under solaris10,like follows:

#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);
}

when I compile above,it raise following error:
undefined:nanosleep

Why? Which header file include nanosleep function? How to find this header file?

thanks

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.