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:
09f836d
)
Timer: fallback to realtime if monotonic clock is not implemented
author
Rémi Denis-Courmont
<remi@remlab.net>
Tue, 2 Jun 2009 19:10:41 +0000
(22:10 +0300)
committer
Rémi Denis-Courmont
<remi@remlab.net>
Tue, 2 Jun 2009 19:10:41 +0000
(22:10 +0300)
src/misc/pthread.c
patch
|
blob
|
history
diff --git
a/src/misc/pthread.c
b/src/misc/pthread.c
index
f3127f3
..
be39b1b
100644
(file)
--- a/
src/misc/pthread.c
+++ b/
src/misc/pthread.c
@@
-614,8
+614,13
@@
int vlc_timer_create (vlc_timer_t *id, void (*func) (vlc_timer_t *, void *),
id->func = func;
id->data = data;
+#if (_POSIX_CLOCK_SELECTION >= 0)
if (timer_create (CLOCK_MONOTONIC, &ev, &id->handle))
+#else
+ if (timer_create (CLOCK_REALTIME, &ev, &id->handle))
+#endif
return errno;
+
return 0;
}