[vlc-commits] vlc_threads: base mtime_t sleep defines on CLOCK_FREQ

Steve Lhomme git at videolan.org
Sat May 5 18:10:13 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri May  4 09:38:14 2018 +0200| [f62667c2e78eaf4fe92d950e1f5b059441d32e71] | committer: Rémi Denis-Courmont

vlc_threads: base mtime_t sleep defines on CLOCK_FREQ

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 include/vlc_threads.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/vlc_threads.h b/include/vlc_threads.h
index 37054a3ded..508ddbc001 100644
--- a/include/vlc_threads.h
+++ b/include/vlc_threads.h
@@ -858,8 +858,8 @@ VLC_API void mwait(mtime_t deadline);
  */
 VLC_API void msleep(mtime_t delay);
 
-#define VLC_HARD_MIN_SLEEP   10000 /* 10 milliseconds = 1 tick at 100Hz */
-#define VLC_SOFT_MIN_SLEEP 9000000 /* 9 seconds */
+#define VLC_HARD_MIN_SLEEP  (CLOCK_FREQ/100) /* 10 milliseconds = 1 tick at 100Hz */
+#define VLC_SOFT_MIN_SLEEP  (9*CLOCK_FREQ)   /* 9 seconds */
 
 #if defined (__GNUC__) && !defined (__clang__)
 /* Linux has 100, 250, 300 or 1000Hz



More information about the vlc-commits mailing list