| timeFormat | R Documentation |
This function is primarily intended as a helper function for
the eatRep and eatModel packages and adjusts the display of
time differences to the seconds, minutes, or hours format, depending on the length.
Hence, the function allows for clearer display of time differences according
to Sys.time.
timeFormat(timediff, digits)
timediff |
The object returned by two differences of |
digits |
number of digits for rounding. If missing, values less than 0.05 are rounded to three decimal places, and values greater than 0.05 are rounded to one decimal place. |
A numeric vector
begin <- Sys.time()
Sys.sleep(0.15)
message(paste0("Time during system was sleeping: ", timeFormat(Sys.time() - begin)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.