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) {
|
while (time(&now) == np->n_time) {
|
||||||
/* Time of target is equal to the current time. This bothers us, because
|
/* 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
|
* 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
|
* on within a second. So wait until the second is over.
|
||||||
* coarse for today's fast machines.)
|
|
||||||
*/
|
*/
|
||||||
sleep(1);
|
usleep(10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rules) {
|
if (rules) {
|
||||||
|
|
Loading…
Reference in a new issue