createTimer {timeR}R Documentation

Create a timer object

Description

Create a timer object

Usage

createTimer(verbose = T, precision = "s")

Arguments

verbose

A parameter to control whether to print messages while using methods. Default to TRUE.

precision

Precision for time, default to s, valid values are: s,ms and us

Value

a timer object.

Examples

timer1 <- createTimer() # print is enabled
timer1 <- createTimer(FALSE) # print is disabled
timer1$start("event1") # start timing for event 1
timer1$stop("event1", comment = "event 1 stopped") # stop timing for event 1(comment is optional)
getTimer(timer1) # get all records in a data frame

[Package timeR version 1.2.0 Index]