diff options
author | Ico Doornekamp <ico@pruts.nl> | 2020-06-15 08:58:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 08:58:11 +0200 |
commit | 571bc011eaa9eb9214291d34ca008ab41ce7ebc1 (patch) | |
tree | 7fb06de6d686c0e9acad132724880534beca3afd /lib | |
parent | a056b4c3f135120bdd948c32273fd902273c2773 (diff) | |
download | Nim-571bc011eaa9eb9214291d34ca008ab41ce7ebc1.tar.gz |
Added --benchmarkVM to times.cpuTime() documentation (#14663)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/times.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pure/times.nim b/lib/pure/times.nim index 1fff3d99b..01eb16c23 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 |