Fix interval recalculation in the event that usleep is interrupted
llvm-svn: 207566
This commit is contained in:
parent
67077b3032
commit
993fa0604d
@ -21,7 +21,7 @@ wait_a_while (useconds_t interval)
|
||||
{
|
||||
struct timeval now;
|
||||
gettimeofday(&now, NULL);
|
||||
interval = target - now.tv_sec * 1000000 + now.tv_usec;
|
||||
interval = target - (now.tv_sec * 1000000 + now.tv_usec);
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user