Logo Search packages:      
Sourcecode: jack-tools version File versions  Download package

time.c

#ifndef _TIME_C
#define _TIME_C

#include <time.h>
#include <sys/time.h>

int 
xusleep ( unsigned long usec )
{
  struct timespec t ;
  long nsec = usec * 1000 ;
  ldiv_t d = ldiv ( nsec , 1000000000L ) ;
  t.tv_sec = d.quot ;
  t.tv_nsec = d.rem ;
  return nanosleep ( &t , NULL ) ;
}

#endif

Generated by  Doxygen 1.6.0   Back to index