Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/libbb/bb_do_delay.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 13  void FAST_FUNC bb_do_delay(int seconds) Line 13  void FAST_FUNC bb_do_delay(int seconds)
13  {  {
14   time_t start, now;   time_t start, now;
15    
16   time(&start);   start = time(NULL);
17   now = start;   do {
  while (difftime(now, start) < seconds) {  
18   sleep(seconds);   sleep(seconds);
19   time(&now);   now = time(NULL);
20   }   } while ((now - start) < seconds);
21  }  }

Legend:
Removed from v.983  
changed lines
  Added in v.984