hush/libbb/bb_do_delay.c
Denys Vlasenko 12450dbeef libbb/bb_do_delay.c: shrink
function                                             old     new   delta
difftime                                               9       -      -9
bb_do_delay                                           88      38     -50
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-59)             Total: -59 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 09:54:34 +01:00

22 lines
383 B
C

/* vi: set sw=4 ts=4: */
/*
* Busybox utility routines.
*
* Copyright (C) 2005 by Tito Ragusa <tito-wolit@tiscali.it>
*
* Licensed under the GPL v2, see the file LICENSE in this tarball.
*/
#include "libbb.h"
void FAST_FUNC bb_do_delay(int seconds)
{
time_t start, now;
start = time(NULL);
do {
sleep(seconds);
now = time(NULL);
} while ((now - start) < seconds);
}