Measuring the wall-clock time. Example:
import os let timer = Timer() withTimer(timer): sleep(2_000) # 2 seconds echo "Elapsed time: $1".format(timer.elapsedTime)
Procs
proc elapsedTime(self: Timer): float {....raises: [], tags: [], forbids: [].}
Measuring the wall-clock time. Example:
import os let timer = Timer() withTimer(timer): sleep(2_000) # 2 seconds echo "Elapsed time: $1".format(timer.elapsedTime)
proc elapsedTime(self: Timer): float {....raises: [], tags: [], forbids: [].}