[vlc-commits] thread: use vlc_tick_from_timespec()
Steve Lhomme
git at videolan.org
Wed Jul 4 11:38:44 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jul 4 11:37:18 2018 +0200| [e3f1b1a2bec28b63d4016aff3b507d654c0d9c1e] | committer: Steve Lhomme
thread: use vlc_tick_from_timespec()
Some were mistakenly using vlc_tick_from_timeval()
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e3f1b1a2bec28b63d4016aff3b507d654c0d9c1e
---
src/android/thread.c | 2 +-
src/misc/threads.c | 2 +-
src/posix/thread.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/android/thread.c b/src/android/thread.c
index 909d955933..ce70b478b7 100644
--- a/src/android/thread.c
+++ b/src/android/thread.c
@@ -416,7 +416,7 @@ vlc_tick_t vlc_tick_now (void)
if (unlikely(clock_gettime (CLOCK_MONOTONIC, &ts) != 0))
abort ();
- return vlc_tick_from_timeval( &ts );
+ return vlc_tick_from_timespec( &ts );
}
/* cpu */
diff --git a/src/misc/threads.c b/src/misc/threads.c
index e4ec1da935..3fb438000d 100644
--- a/src/misc/threads.c
+++ b/src/misc/threads.c
@@ -219,7 +219,7 @@ int vlc_cond_timedwait_daytime(vlc_cond_t *cond, vlc_mutex_t *mutex,
vlc_tick_t deadline = vlc_tick_from_sec( deadline_daytime );
timespec_get(&ts, TIME_UTC);
- deadline -= vlc_tick_from_sec( ts.tv_sec ) + VLC_TICK_FROM_NS( ts.tv_nsec );
+ deadline -= vlc_tick_from_timespec( &ts );
return vlc_cond_wait_delay(cond, mutex, deadline);
}
diff --git a/src/posix/thread.c b/src/posix/thread.c
index f3db3f063f..fc92102df6 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -577,7 +577,7 @@ vlc_tick_t vlc_tick_now (void)
if (unlikely(clock_gettime(CLOCK_MONOTONIC, &ts) != 0))
abort ();
- return vlc_tick_from_timeval( &ts );
+ return vlc_tick_from_timespec( &ts );
}
#undef vlc_tick_wait
More information about the vlc-commits
mailing list