Description Usage Arguments Value Examples
View source: R/timer_function.R
Create a timer object
1 | createTimer(verbose = T, precision = "s")
|
verbose |
A parameter to control whether to print messages while using
methods. Default to |
precision |
Precision for time, default to s, valid values are: s,ms and us |
a timer object.
1 2 3 4 5 | 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
|
sh: 1: timedatectl: Permission denied
Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In system("timedatectl", intern = TRUE) :
running command 'timedatectl' had status 126
2: In file(con, "r") : cannot open file '/etc/timezone': Permission denied
event start end timeElapsed comment
1 event1 2021-01-18 06:54:03 2021-01-18 06:54:03 0 event 1 stopped
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.