Time {time} | R Documentation |
getTime
turns the output of date
into an "integer"
vector of length 3, timeElapsed
determines the difference between two such times, and timeChar
reports a time in a nice way. timeReport
is a macro for the latter two.
old <- getTime() timeElapsed( old, new = getTime() ) timeChar( time = getTime() ) timeReport(time)
old |
"integer" vector of length 3 that specifies hours, minutes, and seconds, respectively. |
new |
"integer" vector of length 3 that specifies hours, minutes, and seconds, respectively. |
time |
"integer" vector of length 3 that specifies hours, minutes, and seconds, respectively. |
"integer" vector of length 3 that specifies hours, minutes, and seconds, respectively.
It is usually nice to provide the user a verbose
option that he may choose to set to FALSE
if no output from time tracking functions is desired. Also, a known bug is that timeElapsed
considers 24 to be the maximal number of hours in the day, and thus if it is called after midnight for a calculation started the day before, an incorrect difference will be calculated.
Toby Dylan Hocking <tobob@berkeley.edu>
time <- getTime() #TimeConsumingAnalysisTask timeReport(time)