Commit bbd004e5 authored by Benjamin Summerton's avatar Benjamin Summerton

Small code simplification

parent 317544fc
......@@ -269,7 +269,7 @@ proc secs*(sw: var Stopwatch): float =
## See also: `totalUsecs()`, `totalMsecs()`, `totalSecs()`
proc totalNsecs*(sw: var Stopwatch): int64 =
let curTicks = getTicks().Nanos
let total = if sw.laps.len != 0: foldl(sw.laps, a + b) else: 0
let total = foldl(sw.laps, a + b, 0.int64)
if sw.running:
# Return total + current lap
......
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