cpu.time | R Documentation |
Returns and (optionally) prints the total and/or partial (since the last call to this function) real and CPU times.
cpu.time(..., reset = FALSE, total = TRUE, last = TRUE, flush = FALSE)
... |
objects (describing the last operation) to be printed (using |
reset |
logical; if |
total |
logical; if |
last |
logical; if |
flush |
logical; if |
Invisibly returns a list with the following 3 components
(objects of class "proc_time"
):
time |
user, system, and total elapsed times for the currently running R process
(result of a call to |
last , total |
differences between the corresponding |
proc.time
, system.time
, flush.console
.
cpu.time(reset=TRUE)
res <- median(runif(100000))
cpu.time('\nSample median of', 100000, 'values =', res)
res <- median(runif(1000))
cpu.time('\nSample median of', 1000, 'values =', res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.