From 571bc011eaa9eb9214291d34ca008ab41ce7ebc1 Mon Sep 17 00:00:00 2001 From: Ico Doornekamp Date: Mon, 15 Jun 2020 08:58:11 +0200 Subject: [PATCH] Added --benchmarkVM to times.cpuTime() documentation (#14663) --- lib/pure/times.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 1fff3d99bf..01eb16c231 100644 --- a/lib/pure/times.nim +++ b/lib/pure/times.nim @@ -2619,6 +2619,8 @@ when not defined(js): fib.add(fib[^1] + fib[^2]) echo "CPU time [s] ", cpuTime() - t0 echo "Fib is [s] ", fib + ## When the flag `--benchmarkVM` is passed to the compiler, this proc is + ## also available at compile time when defined(posix) and not defined(osx) and declared(CLOCK_THREAD_CPUTIME_ID): # 'clocksPerSec' is a compile-time constant, possibly a # rather awful one, so use clock_gettime instead