[vlc-commits] vlm: use timespec_get()
    Rémi Denis-Courmont 
    git at videolan.org
       
    Wed Dec  9 18:18:12 CET 2015
    
    
  
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Dec  9 19:02:04 2015 +0200| [a392c1012d46600d95bdf631d2dd1cae6fb85a16] | committer: Rémi Denis-Courmont
vlm: use timespec_get()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a392c1012d46600d95bdf631d2dd1cae6fb85a16
---
 src/input/vlm.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/input/vlm.c b/src/input/vlm.c
index 86d63f0..0854dd6 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -37,7 +37,7 @@
 #include <time.h>                                                 /* ctime() */
 #include <limits.h>
 #include <assert.h>
-#include <sys/time.h>                                      /* gettimeofday() */
+#include <time.h>
 
 #include <vlc_vlm.h>
 #include <vlc_modules.h>
@@ -259,10 +259,10 @@ int vlm_ExecuteCommand( vlm_t *p_vlm, const char *psz_command,
 
 int64_t vlm_Date(void)
 {
-    struct timeval tv;
+    struct timespec ts;
 
-    (void)gettimeofday( &tv, NULL );
-    return tv.tv_sec * INT64_C(1000000) + tv.tv_usec;
+    (void)timespec_get( &ts, TIME_UTC );
+    return ts.tv_sec * INT64_C(1000000) + (ts.tv_nsec / 1000);
 }
 
 
    
    
More information about the vlc-commits
mailing list