Commit f9dab819 authored by Benjamin Summerton's avatar Benjamin Summerton

Done with core functionality!

parent 985b1027
......@@ -31,10 +31,7 @@ proc laps*(sw: var Stopwatch; incCur: bool = false): seq[int64] {.inline.}
proc rmLap*(sw: var Stopwatch; num: int) {.inline.}
proc clearLaps(sw: var Stopwatch) {.inline.}
# These functions are for the current lap (or previous one if not running)
# TODO do we even need those to be methods on the stopwatch? maybe because they are nice convienence methods
# TODO fix them up
proc nsecs*(sw: var Stopwatch): int64 {.inline.}
proc usecs*(sw: var Stopwatch): int64 {.inline.}
proc msecs*(sw: var Stopwatch): int64 {.inline.}
......@@ -53,7 +50,6 @@ proc totalSecs*(sw: var Stopwatch): float {.inline.}
{.deprecated: [seconds: secs].}
# TODO document
proc newStopwatch*(): Stopwatch =
result = Stopwatch(
......@@ -55,7 +55,10 @@ echo "all laps=", sw.laps
echo "lapCount=", sw.numLaps
echo "----"
echo "lapCount=", sw2.numLaps
echo "all laps(s)=", map(sw2.laps, secs)
var lapsSecs = int64): float = secs(x))
echo "all laps(s)=", lapsSecs
echo ""
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