summaryrefslogtreecommitdiffstatshomepage
path: root/unix/modtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/modtime.c')
-rw-r--r--unix/modtime.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/unix/modtime.c b/unix/modtime.c
index f957b96784..3cc09e3cd8 100644
--- a/unix/modtime.c
+++ b/unix/modtime.c
@@ -55,10 +55,8 @@ void msec_sleep_tv(struct timeval *tv) {
#define MP_CLOCKS_PER_SEC CLOCKS_PER_SEC
#endif
-#if defined(MP_CLOCKS_PER_SEC) && (MP_CLOCKS_PER_SEC == 1000000) // POSIX
-#define CLOCK_DIV 1000.0
-#elif defined(MP_CLOCKS_PER_SEC) && (MP_CLOCKS_PER_SEC == 1000) // WIN32
-#define CLOCK_DIV 1.0
+#if defined(MP_CLOCKS_PER_SEC)
+#define CLOCK_DIV (MP_CLOCKS_PER_SEC / 1000.0)
#else
#error Unsupported clock() implementation
#endif