summary refs log tree commit diff stats
path: root/lib/system/threads.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/system/threads.nim')
-rw-r--r--lib/system/threads.nim9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/system/threads.nim b/lib/system/threads.nim
index e32b77258..3f8387459 100644
--- a/lib/system/threads.nim
+++ b/lib/system/threads.nim
@@ -117,10 +117,11 @@ else:
     schedh = "#define _GNU_SOURCE\n#include <sched.h>"
     pthreadh = "#define _GNU_SOURCE\n#include <pthread.h>"
 
-  when defined(linux):
-    type Time = clong
-  else:
-    type Time = int
+  when not declared(Time):
+    when defined(linux):
+      type Time = clong
+    else:
+      type Time = int
 
   type
     SysThread* {.importc: "pthread_t", header: "<sys/types.h>",