summary refs log tree commit diff stats
path: root/lib/pure/times.nim
diff options
context:
space:
mode:
authorrumpf_a@web.de <>2010-02-21 19:42:36 +0100
committerrumpf_a@web.de <>2010-02-21 19:42:36 +0100
commitd913fdb2800d83680e413cd8a5f07b7f85deac6e (patch)
tree09a284861adf96520059f211ba8bae1a76294a9c /lib/pure/times.nim
parent6bc16904edd3738ab97573b9eeb3a6a7cce9574c (diff)
downloadNim-d913fdb2800d83680e413cd8a5f07b7f85deac6e.tar.gz
start of tests refactoring; sqlite3 new wrapper fixes
Diffstat (limited to 'lib/pure/times.nim')
-rw-r--r--lib/pure/times.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim
index a54af3254..70cb038a7 100644
--- a/lib/pure/times.nim
+++ b/lib/pure/times.nim
@@ -196,7 +196,11 @@ when not defined(ECMAScript):
   proc `-` (a, b: TTime): int64 =
     return toBiggestInt(difftime(a, b))
   
-  proc getStartMilsecs(): int = return clock() div (clocksPerSec div 1000)
+  proc getStartMilsecs(): int =
+    #echo "clocks per sec: ", clocksPerSec
+    #return clock() div (clocksPerSec div 1000)
+    result = toInt(toFloat(clock()) / (toFloat(clocksPerSec) / 1000.0))
+    
   proc getTime(): TTime = return timec(nil)
   proc getLocalTime(t: TTime): TTimeInfo =
     var a = t