mirror of
https://github.com/sheumann/hush.git
synced 2024-11-05 06:07:00 +00:00
12450dbeef
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>
22 lines
383 B
C
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);
|
|
}
|