]> git.sesse.net Git - vlc/commitdiff
vlm: Use RT rather than monotonic clock - fixes #1288
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 1 Nov 2007 20:12:39 +0000 (20:12 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 1 Nov 2007 20:12:39 +0000 (20:12 +0000)
Patch by Brian C. Wiles

src/input/vlm.c

index b64a9df215720e7c88558aeadac2feb0820a39c6..819c375e24b454954ecd1da6faecb2e53e660a80 100644 (file)
@@ -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
 }