Commit 5c4c1c5b authored by Benjamin Summerton's avatar Benjamin Summerton

It compiles!

but "sleep()" isn't working
parent 437432d1
......@@ -2,18 +2,19 @@ include system/timers
Stopwatch* = ref object
running*: bool
start*: Nanos
stop*: Nanos
Stopwatch* = object
running: bool
start: Nanos
stop: Nanos
# TODO document
proc newStopwatch*(): Stopwatch =
result.running = false
result.start = 0
result.stop = 0
result = Stopwatch(
running: false,
start: 0,
stop: 0
# TODO clone/copy constructor
import stopwatch
from os import sleep
var sw: Stopwatch = newStopwatch()
var sw = newStopwatch()
echo sw.secs
#echo sw.msecs
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