Use a usleep() loop instead of sleep(1) until the second has passed if
necessary.
This commit is contained in:
parent
1e0469ce74
commit
dc55ba447d
1 changed files with 2 additions and 3 deletions
|
@ -567,10 +567,9 @@ int level;
|
|||
while (time(&now) == np->n_time) {
|
||||
/* Time of target is equal to the current time. This bothers us, because
|
||||
* we can't tell if it needs to be updated if we update a file it depends
|
||||
* on within a second. So wait a second. (A per-second timer is too
|
||||
* coarse for today's fast machines.)
|
||||
* on within a second. So wait until the second is over.
|
||||
*/
|
||||
sleep(1);
|
||||
usleep(10000);
|
||||
}
|
||||
|
||||
if (rules) {
|
||||
|
|
Loading…
Reference in a new issue