tic | R Documentation |
Start a stopwatch.
Stop a stopwatch.
tic(id = 1, start = proc.time()["elapsed"], quiet = TRUE)
toc(
id = 1,
msg = "Elapsed time:",
type = "units",
signif = 3,
quiet = FALSE,
...
)
id |
Define ID if multiple |
start |
Start time. Now is default. |
quiet |
Boolean. Quiet messages? |
msg |
Character. Custom message shown |
type |
Character. Output format for |
signif |
Integer. Significant digits. |
... |
Additional parameters. |
Invisible list. Contains tic (start time), toc (stop time), elapsed time and message printed.
toc
returns an (invisible) list containing the time-stamps
tic
and toc
, time
in seconds and the message msg
.
Other Tools:
autoline()
,
bind_files()
,
bring_api()
,
chr2num()
,
db_download()
,
db_upload()
,
export_plot()
,
export_results()
,
files_functions()
,
font_exists()
,
formatColoured()
,
formatHTML()
,
get_credentials()
,
glued()
,
grepm()
,
h2o_selectmodel()
,
haveInternet()
,
image_metadata()
,
importxlsx()
,
ip_data()
,
json2vector()
,
list_cats()
,
listfiles()
,
mail_send()
,
markdown2df()
,
move_files()
,
msplit()
,
myip()
,
quiet()
,
read.file()
,
statusbar()
,
try_require()
,
updateLares()
,
warnifnot()
,
what_size()
# Basic use (global stopwatch)
tic()
Sys.sleep(0.1)
toc()
# Multiple tic tocs
tic(id = "two", quiet = FALSE)
Sys.sleep(0.2)
toc(id = "two")
# Global is still working (id = 1)
toc(msg = "The function finished its work in")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.