summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--uisimulator/x11/thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/uisimulator/x11/thread.c b/uisimulator/x11/thread.c
index 12a3b3e0c7..4288c0ffcb 100644
--- a/uisimulator/x11/thread.c
+++ b/uisimulator/x11/thread.c
@@ -31,7 +31,7 @@ static void msleep(int msec)
struct timeval delay;
delay.tv_sec = msec / 1000;
- delay.tv_usec = (msec - 1000 * delay.tv_sec) * 1000;
+ delay.tv_usec = (msec % 1000) * 1000;
select(0, NULL, NULL, NULL, &delay); /* portable sub-second sleep */
}