pykot/jtimes

Search:
Group by:

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)

Types

Timer = ref object

Procs

proc elapsedTime(self: Timer): float {....raises: [], tags: [], forbids: [].}

Templates

template withTimer(timer: Timer; body: untyped)