timediff - Computes time difference between files

SYNOPSIS

timediff  [ parameter=value ]  [ inputfile ... ]

Parameters are: pass_date, start_time, time_units, absolute_diff.

DESCRIPTION

timediff computes the time difference between

two TeraScan datasets.

one TeraScan dataset and a user specified date and time

The time of a dataset is determined from its pass_date and start_time attributes.

The time difference is written to UNIX stdout, so it can be captured in a shell variable as part of a shell script. The difference is rounded to the nearest whole number, based on the time_units parameter.

PARAMETERS

pass_date
User specified date, for the case where there is only one input file. There is no default.
start_time
User specified time, for the case where there is only one input file. There is no default.
time_units
Output time difference units. Choices are seconds, minutes, hours, and days. The default is minutes.
absolute_diff
If yes, the absolute value of the time difference is output. If no, either (time(file1) - time(file2)) or (time(file1) - user specified time) is output. The default is yes.

EXAMPLES

In the following example, the absolute time difference between a file $FILE and an online pass $LASTPASS is computed:

set DATE = `passinfo pass_number=$LASTPASS item=date`
set TIME = `passinfo pass_number=$LASTPASS item=time`
set DIFF = `timediff time_units=minutes absolute_diff=yes
                   pass_date=$DATE start_time=$TIME $FILE`

SEE ALSO

tsdate


Last Update: $Date: 1999/05/10 20:46:40 $