libbb/bb_do_delay.c: shrink
No binary (build failed)
—
(log yok)
| @@ -13,10 +13,9 @@ void FAST_FUNC bb_do_delay(int seconds) | |
| { | |
| time_t start, now; | |
| - | time(&start); |
| - | now = start; |
| - | while (difftime(now, start) < seconds) { |
| + | start = time(NULL); |
| + | do { |
| sleep(seconds); | |
| - | time(&now); |
| - | } |
| + | now = time(NULL); |
| + | } while ((now - start) < seconds); |
| } | |