Convert time difference to string.
Convert time difference in seconds to string depending on switch.
dt2str(dt,dec=0,verbose=FALSE)
dt |
Time difference in seconds |
dec |
Places in decimal fraction of seconds |
verbose |
If |
String representing the time difference, with dec
decimals in seconds.
Enclosing the above statements in a function is likely to show zero time.
Christian W. Hoffmann <christian@echoffmann.ch>
t1 <- unclass(Sys.time()) x <- 0; for (i in 1:1.e6) x <- x+1 t2 <- unclass(Sys.time()) dt2str(t2-t1,3) # 00:00:0.070, Macbook Pro 2016, 2.2 GHz, 16GB RAM
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.