get_chronotime {anMC} | R Documentation |
Returns a time indicator that can be used to accurately measure elapsed time. The C++11 clock used is chrono::high_resolution_clock
.
get_chronotime()
A double with the number of nanoseconds elapsed since a fixed epoch.
# Measure 1 second sleep
initT<-get_chronotime()
Sys.sleep(1)
measT<-(get_chronotime()-initT)*1e-9
cat("1 second passed in ",measT," seconds.\n")