mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-25 18:13:09 +02:00
tools/dirtpan/dirtpan.c (timeout): fencepost error when normalizing tv_usec
This commit is contained in:
parent
171500e414
commit
354789da8d
@ -183,7 +183,7 @@ static struct timeval *timeout(int ms)
|
||||
t.tv_sec--;
|
||||
t.tv_usec += 1000000;
|
||||
}
|
||||
while (t.tv_usec > 1000000) {
|
||||
while (t.tv_usec >= 1000000) {
|
||||
t.tv_sec++;
|
||||
t.tv_usec -= 1000000;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user