← Commit list

12450dbee

Denys Vlasenko
Denys Vlasenko
2009-10-27
FAILED Duration: 33s

Subject

libbb/bb_do_delay.c: shrink

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

libbb/bb_do_delay.c+4 -5
@@ -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);
}