From 131163af59a161c1794e254193e2d6c620472e29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Thu, 1 Nov 2007 20:12:39 +0000 Subject: [PATCH] vlm: Use RT rather than monotonic clock - fixes #1288 Patch by Brian C. Wiles --- src/input/vlm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/input/vlm.c b/src/input/vlm.c index b64a9df215..819c375e24 100644 --- a/src/input/vlm.c +++ b/src/input/vlm.c @@ -1049,7 +1049,11 @@ static int64_t vlm_Date(void) ftime( &tm ); return ((int64_t)tm.time) * 1000000 + ((int64_t)tm.millitm) * 1000; #else - return mdate(); + struct timeval tv_date; + + /* gettimeofday() cannot fail given &tv_date is a valid address */ + (void)gettimeofday( &tv_date, NULL ); + return (mtime_t) tv_date.tv_sec * 1000000 + (mtime_t) tv_date.tv_usec; #endif } -- 2.20.1