get_chronotime {anMC}R Documentation

Measure elapsed time with C++11 chrono library

Description

Returns a time indicator that can be used to accurately measure elapsed time. The C++11 clock used is chrono::high_resolution_clock.

Usage

get_chronotime()

Value

A double with the number of nanoseconds elapsed since a fixed epoch.

Examples

# Measure 1 second sleep
initT<-get_chronotime()
Sys.sleep(1)
measT<-(get_chronotime()-initT)*1e-9
cat("1 second passed in ",measT," seconds.\n")

[Package anMC version 0.2.2 Index]