git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa31448
)
vlm: Use RT rather than monotonic clock - fixes #1288
author
Rémi Denis-Courmont
<rem@videolan.org>
Thu, 1 Nov 2007 20:12:39 +0000
(20:12 +0000)
committer
Ré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
patch
|
blob
|
history
diff --git
a/src/input/vlm.c
b/src/input/vlm.c
index
b64a9df
..
819c375
100644
(file)
--- 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
}