Learn R Programming

timeR (version 1.2.0)

createTimer: 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

Run this code
# NOT RUN {
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
# }

Run the code above in your browser using DataLab