Previous Scientific Data Formats: Common Data Format Next

CDF_EPOCH_DIFF

Syntax | Arguments | Keywords | Examples | Version History

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

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.

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)  
  

Version History

 

6.4
Introduced

  IDL Online Help (March 06, 2007)