Diff of /trunk/mkinitrd-magellan/busybox/libbb/bb_do_delay.c
Parent Directory | Revision Log | 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 | } | } |
|