nstcl  >  Documentation  >  nstcl-time  >  elapsed_time

Tcl Powered!

elapsed_time

NAME

elapsed_time — Returns the amount of elapsed time between two dates

SYNOPSIS

package require nstcl-time ?1.0.1?
package require nstcl ?1.0?

::nstcl::elapsed_time ?-absolute_value? ?-floating_point? ?-units units? date1 ?date2?

DESCRIPTION

Calculates the difference between two dates (which can be in any format understood by [clock scan]) and returns the elapsed time in units.

OPTIONAL SWITCHES

-absolute_value
If this switch is present, and the calculated elapsed time is a negative number, then the absolute value of elapsed time is returned instead.
-floating_point
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.)

KEYWORDS

nstcl, time