Added --benchmarkVM to times.cpuTime() documentation (#14663)

This commit is contained in:
Ico Doornekamp
2020-06-15 08:58:11 +02:00
committed by GitHub
parent a056b4c3f1
commit 571bc011ea

View File

@@ -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