Given a start and end time in seconds, returns elapsed time in sec., min. or hrs, as appropriate.

elapsed_time(t0, t1)

Arguments

t0

Numeric start time representing seconds. No default.

t1

Numeric end time representing continuous second count from t0. No default.

Value

String containing elapsed time.

Examples

# NOT RUN {
start <- proc.time()[3]
end <- proc.time()[3]
elapsed_time(t0=start, t1=end)

start <- proc.time()
elapsed_time(start[3], proc.time()[3])
# }