Stopwatch | R Documentation |
Create a StopwatchRefClass object
Stopwatch(name = "", start_watch = FALSE)
name |
the name to assign to this object |
start_watch |
logical, if TRUE then start the Stopwatch |
a StopwatchRefClass
object
Other Stopwatch Timekeeper: Timekeeper_elapsed
,
Timekeeper_has_watch
,
Timekeeper_reset
,
Timekeeper_start
,
Timekeeper_stop
, Timekeeper
## Not run: # create stop watch X <- Stopwatch(name = 'timex', start = FALSE) #start it X$start() X$elapsed() X Sys.sleep(5) # When stopping you can name the interval for later retreival X$stop(name = 'first') X X$elapsed(name = "first") X$start() Sys.sleep(2) X$stop(name = "second") X$elapsed(name = 'second') X$elapsed(name = 'first') # now accumulate the elapsed times X$elapsed(accumulate = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.