Reference: IVECalcTimeDiff

Overview

IVECalcTimeDiff returns the number of microseconds difference between two times reported by IVEGetCurrTime. While the return value is in microseconds, the resolution of the time measurements may be coarser than that.

Prototype (C)

#include "ive_standards.h"
#include "ive_time.h"
IVETimeInterval IVECalcTimeDiff(const IVETimeValue* p_t2, const IVETimeValue* p_t1, int* p_status);

Prototype (Fortran)

There is no Fortran interface.

Parameters

p_t2
*p_t2 is the end point for the time interval.
p_t1
*p_t1 is the starting point for the time interval.
p_status
If p_status is not 0, then if an overflow occurs calculating the time difference *p_status is set to IVE_ERR_OVERFLOW. In all other situations, *p_status is not modified.

Return value

The value of *p_t2 minus *p_t1 in microseconds is returned. If the value would overflow the range that can be represented by an IVETimeInterval, the return value is IVE_TIME_INTERVAL_MAX (if *p_t2 appears to be later than *p_t1) or IVE_TIME_INTERVAL_MIN and, if p_status is not 0, *p_status is set to IVE_ERR_OVERFLOW.

Side effects

Inclusion of ive_standards.h sets certain feature-set macros. It is safest to include it before any other headers to avoid inconsistent definitions.

Cross references

IVEGetCurrTime, IVETimeInterval, IVETimeValue, and IVE_ERR_OVERFLOW


| categories | alphabetical |


modified May 7, 2002

Eric Branlund (eric@msg.ucsf.edu)