elapsed_time Returns the amount of elapsed time between two dates
package require nstcl-time ?1.0.1?
package require nstcl ?1.0?
::nstcl::elapsed_time ?-absolute_value? ?-floating_point? ?-units units? date1 ?date2?
Calculates the difference between two dates (which can be in any format understood by [clock scan]) and returns the elapsed time in units.
- If this switch is present, and the calculated elapsed time is a negative number, then the absolute value of elapsed time is returned instead.
- If this switch is not present then the result of the calculation is truncated to the nearest whole integer value.
- -units (defaults to seconds)
- Specifies the units the elapsed time calculation is to be done in. units may be any meaningful value understood by [clock scan] (such as seconds, minutes, hours, days, weeks, fortnights, etc.)