[vlc-commits] os2:threads: convert microseconds to ticks using VLC_TICK_FROM_US()

Steve Lhomme git at videolan.org
Tue Jul 3 15:30:47 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul  3 15:08:56 2018 +0200| [5f4f28d02362e0230a945c1244e04242bfb9e497] | committer: Steve Lhomme

os2:threads: convert microseconds to ticks using VLC_TICK_FROM_US()

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5f4f28d02362e0230a945c1244e04242bfb9e497
---

 src/os2/thread.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/os2/thread.c b/src/os2/thread.c
index d3a64f17fa..fe88dd7088 100644
--- a/src/os2/thread.c
+++ b/src/os2/thread.c
@@ -418,8 +418,7 @@ int vlc_cond_timedwait_daytime (vlc_cond_t *p_condvar, vlc_mutex_t *p_mutex,
 
     gettimeofday (&tv, NULL);
 
-    total = vlc_tick_from_sec( tv.tv_sec ) +
-            CLOCK_FREQ * tv.tv_usec / 1000000L;
+    total = vlc_tick_from_sec( tv.tv_sec ) + VLC_TICK_FROM_US( tv.tv_usec );
     total = (deadline - total) / 1000;
     if( total < 0 )
         total = 0;



More information about the vlc-commits mailing list