Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / IDL Reference / I/O - CDF / CDF_EPOCH_DIFF

CDF_EPOCH_DIFF

CDF_EPOCH_DIFF

The CDF_EPOCH_DIFF function compares two epoch (date and time) values and returns the difference in milliseconds (default) or microseconds.

Examples


CDF_EPOCH, epoch, 2005,6,1,10,18,17,2,/COMPUTE
CDF_EPOCH, epoch1, 2005,6,1,10,18,17,2,3,4,5,/COMPUTE
CDF_EPOCH, epoch2, 2005,6,1,10,18,17,2,1,4,5,/COMPUTE
CDF_EPOCH, epoch3, 2005,6,1,10,18,17,1,/COMPUTE
PRINT, 'Difference between epoch1 and epoch, in milliseconds: ',$
   CDF_EPOCH_DIFF(epoch1,epoch)
PRINT, 'Difference between epoch1 and epoch, in microseconds: ',$
   CDF_EPOCH_DIFF(epoch1,epoch,/MICRO_SECONDS)
PRINT, 'Difference between epoch1 and epoch2, in microseconds: ',$
   CDF_EPOCH_DIFF(epoch1,epoch2,/MICRO_SECONDS)
PRINT, 'Difference between epoch1 and epoch3, in microseconds: ',$
   CDF_EPOCH_DIFF(epoch1,epoch3,/MILLI_SECONDS)

Syntax


Result = CDF_EPOCH_DIFF(epoch1, epoch2 [, /MILLI_SECONDS] [, /MICRO_SECONDS])

Arguments


epoch1
epoch2

An epoch value returned from CDF_EPOCH or CDF_EPOCH16 with the COMPUTE keyword set, or from CDF_VARGET or CDF_VARGET1.

Keywords


MILLI_SECONDS

Set this keyword to return the difference in milliseconds. This is the default.

MICRO_SECONDS

Set this keyword to return the difference in microseconds.

Version History


6.4

Introduced

 



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us