Commit e5f52eaf authored by Benjamin Summerton's avatar Benjamin Summerton

Gave "sleep()" the wrong value...

parent 5c4c1c5b
......@@ -20,6 +20,10 @@ proc newStopwatch*(): Stopwatch =
# TODO clone/copy constructor
proc running*(sw: var Stopwatch): bool {.inline.} =
return sw.running
proc start*(sw: var Stopwatch) {.inline.} =
sw.start = getTicks().Nanos
......
......@@ -4,7 +4,7 @@ from os import sleep
var sw = newStopwatch()
sw.start()
sleep(1)
sleep(1000)
sw.stop()
echo sw.secs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment