Description Usage Value Examples
This is a factory function for creating running timers. A function
created using timefactory()
will return the number of seconds
since it was first created. It is intended as a simple alternative to
wrapping code in multiple calls to proc.time()
.
1 |
A function that will return the number of seconds since it was first created.
1 2 3 4 5 6 7 8 9 10 11 | # Create an initial timer
timer1 = timefactory()
Sys.sleep(3)
timer1()
# Create a second timer that is independent of the first.
timer2 = timefactory()
Sys.sleep(2)
timer1()
timer2()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.