Added --benchmarkVM to times.cpuTime() documentation (#14663)
This commit is contained in:
parent
a056b4c3f1
commit
571bc011ea
1 changed files with 2 additions and 0 deletions
|
|
@ -2619,6 +2619,8 @@ when not defined(js):
|
||||||
fib.add(fib[^1] + fib[^2])
|
fib.add(fib[^1] + fib[^2])
|
||||||
echo "CPU time [s] ", cpuTime() - t0
|
echo "CPU time [s] ", cpuTime() - t0
|
||||||
echo "Fib is [s] ", fib
|
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):
|
when defined(posix) and not defined(osx) and declared(CLOCK_THREAD_CPUTIME_ID):
|
||||||
# 'clocksPerSec' is a compile-time constant, possibly a
|
# 'clocksPerSec' is a compile-time constant, possibly a
|
||||||
# rather awful one, so use clock_gettime instead
|
# rather awful one, so use clock_gettime instead
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue