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)
Define ID if multiple tic
& toc
are being used.
Start time. Now is default.
Boolean. Quiet messages?
Character. Custom message shown
Character. Output format for time
list element.
Choose any of: units, clock, seconds
.
Integer. Significant digits
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()
,
bindfiles()
,
bring_api()
,
db_download()
,
db_upload()
,
export_plot()
,
export_results()
,
get_credentials()
,
h2o_predict_API()
,
h2o_predict_MOJO()
,
h2o_predict_binary()
,
h2o_predict_model()
,
h2o_selectmodel()
,
haveInternet()
,
image_metadata()
,
importxlsx()
,
ip_data()
,
json2vector()
,
listfiles()
,
mailSend()
,
msplit()
,
myip()
,
quiet()
,
read.file()
,
statusbar()
,
try_require()
,
updateLares()
,
zerovar()
# NOT RUN {
# 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")
# }
Run the code above in your browser using DataLab