From 5f5973c6c2c447f0602b0090bf1947db2d0759d0 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Fri, 12 Feb 2010 16:03:08 +0000 Subject: [PATCH] * src/lib/evil_unistd.c: fix gettimeofday(). Thanks to Mathieu SCHROETER, from the GeexBox project, for having spotted this. SVN revision: 46116 --- legacy/evil/ChangeLog | 6 ++++++ legacy/evil/src/lib/evil_unistd.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog index 2f16d88fdb..3f794defe0 100644 --- a/legacy/evil/ChangeLog +++ b/legacy/evil/ChangeLog @@ -1,3 +1,9 @@ +2010-02-12 Vincent Torri + + * src/lib/evil_unistd.c: + fix gettimeofday(). Thanks to Mathieu SCHROETER, + from the GeexBox project, for having spotted this. + 2010-01-30 Vincent Torri * src/lib/evil_fcntl.c: diff --git a/legacy/evil/src/lib/evil_unistd.c b/legacy/evil/src/lib/evil_unistd.c index 32c233560e..ad6595be86 100644 --- a/legacy/evil/src/lib/evil_unistd.c +++ b/legacy/evil/src/lib/evil_unistd.c @@ -73,7 +73,7 @@ evil_gettimeofday(struct timeval *tp, void *tzp __UNUSED__) QueryPerformanceCounter(&count); diff = count.QuadPart - _evil_time_count; tp->tv_sec = _evil_time_second + diff / _evil_time_freq; - tp->tv_usec = (diff % _evil_time_freq) * 1000000000ll; + tp->tv_usec = ((diff % _evil_time_freq) * 1000000ll) / _evil_time_freq; return 1; }