[vlc-commits] thread: remove static_assert on CLOCK_FREQ

Steve Lhomme git at videolan.org
Wed Jul 4 10:39:21 CEST 2018


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jul  4 10:27:15 2018 +0200| [edd695f7be1d9c94b58da79a534bdef6c20dd072] | committer: Steve Lhomme

thread: remove static_assert on CLOCK_FREQ

it was there because the nanosecond conversion assumed CLOCK_FREQ was 1,000,000

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

 src/android/thread.c | 1 -
 src/posix/thread.c   | 1 -
 2 files changed, 2 deletions(-)

diff --git a/src/android/thread.c b/src/android/thread.c
index 27b5421b96..909d955933 100644
--- a/src/android/thread.c
+++ b/src/android/thread.c
@@ -416,7 +416,6 @@ vlc_tick_t vlc_tick_now (void)
     if (unlikely(clock_gettime (CLOCK_MONOTONIC, &ts) != 0))
         abort ();
 
-    static_assert(INT64_C(1000000) == CLOCK_FREQ, "CLOCK_FREQ mismatch");
     return vlc_tick_from_timeval( &ts );
 }
 
diff --git a/src/posix/thread.c b/src/posix/thread.c
index 500b6bccc1..14220bb47a 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -585,7 +585,6 @@ vlc_tick_t vlc_tick_now (void)
     if (unlikely(clock_gettime(CLOCK_MONOTONIC, &ts) != 0))
         abort ();
 
-    static_assert(INT64_C(1000000) == CLOCK_FREQ, "CLOCK_FREQ mismatch");
     return vlc_tick_from_timeval( &ts );
 }
 



More information about the vlc-commits mailing list