Home | History | Annotate | Download | only in sys
      1 /*
      2  * sys/sleep.c
      3  */
      4 
      5 #include <unistd.h>
      6 #include <sys/times.h>
      7 #include <syslinux/idle.h>
      8 
      9 unsigned int msleep(unsigned int msec)
     10 {
     11     clock_t start = times(NULL);
     12 
     13     while (times(NULL) - start < msec)
     14 	syslinux_idle();
     15 
     16     return 0;
     17 }
     18 
     19 unsigned int sleep(unsigned int seconds)
     20 {
     21     return msleep(seconds * 1000);
     22 }
     23