From 993fa0604deda01b22d254cc1237a69ccd6aa8fd Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 29 Apr 2014 18:09:44 +0000 Subject: [PATCH] Fix interval recalculation in the event that usleep is interrupted llvm-svn: 207566 --- lldb/test/expression_command/timeout/wait-a-while.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lldb/test/expression_command/timeout/wait-a-while.c b/lldb/test/expression_command/timeout/wait-a-while.c index f3475fc3ff2d..a233f8dedf3a 100644 --- a/lldb/test/expression_command/timeout/wait-a-while.c +++ b/lldb/test/expression_command/timeout/wait-a-while.c @@ -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;