1 #include "lib.h" 2 #include <unistd.h> 3 #include <time.h> 4 #include "sys9.h" 5 6 /* 7 * This is an extension to POSIX 8 */ 9 unsigned int _nap(unsigned int millisecs)10_nap(unsigned int millisecs) 11 { 12 time_t t0, t1; 13 14 t0 = time(0); 15 if(_SLEEP(millisecs) < 0){ 16 t1 = time(0); 17 return t1-t0; 18 } 19 return 0; 20 } 21