2006-01-07 02:29:09 +05:30
|
|
|
/* vi: set sw=4 ts=4: */
|
|
|
|
/*
|
|
|
|
* Busybox utility routines.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2005 by Tito Ragusa <tito-wolit@tiscali.it>
|
|
|
|
*
|
2010-08-16 23:44:46 +05:30
|
|
|
* Licensed under GPLv2, see file LICENSE in this source tree.
|
2006-01-07 02:29:09 +05:30
|
|
|
*/
|
2006-04-03 22:09:31 +05:30
|
|
|
#include "libbb.h"
|
2006-01-07 02:29:09 +05:30
|
|
|
|
2008-06-27 08:22:20 +05:30
|
|
|
void FAST_FUNC bb_do_delay(int seconds)
|
2006-01-07 02:29:09 +05:30
|
|
|
{
|
|
|
|
time_t start, now;
|
|
|
|
|
2009-10-27 14:24:34 +05:30
|
|
|
start = time(NULL);
|
|
|
|
do {
|
2006-01-07 02:29:09 +05:30
|
|
|
sleep(seconds);
|
2009-10-27 14:24:34 +05:30
|
|
|
now = time(NULL);
|
|
|
|
} while ((now - start) < seconds);
|
2006-01-07 02:29:09 +05:30
|
|
|
}
|