summary refs log tree commit diff stats
path: root/lib/pure/math.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/math.nim')
-rw-r--r--lib/pure/math.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pure/math.nim b/lib/pure/math.nim
index 1b6572d53..987c35d1c 100644
--- a/lib/pure/math.nim
+++ b/lib/pure/math.nim
@@ -196,7 +196,6 @@ when not defined(JS):
     ## computes x to power raised of y.
     
   # C procs:
-  proc gettime(dummy: ptr cint): cint {.importc: "time", header: "<time.h>".}
   proc srand(seed: cint) {.importc: "srand", header: "<stdlib.h>".}
   proc rand(): cint {.importc: "rand", header: "<stdlib.h>".}
   
@@ -331,6 +330,8 @@ proc standardDeviation*(s: RunningStat): float =
 {.pop.}
 
 when isMainModule and not defined(JS):
+  proc gettime(dummy: ptr cint): cint {.importc: "time", header: "<time.h>".}
+
   # Verifies random seed initialization.
   let seed = gettime(nil)
   randomize(seed)