Rcpp::CppTimer::ScopedTimer
class. This can be used to time the lifespan of an object until it goes out of scope. This is useful for timing the duration of a function or a loop. The fibonacci
example was updated to use this new class.toc()
statement).tic()
statement was found.verbose
parameter to the Timer
class to control whether above warnings should be printed or not (defaults to true
).toc()
was called without matching tic()
.
reset()
method which was not working properly in some cases where timers spread out over multiple methods.Timer
class. They were not working properly in the previous version.This is the initial release of rcpptimer
. It is based on RcppClock
but contains a number of improvements:
tic
and toc
instead of tick
and tock
to be consistent with R’s tictoc
package