Home |
RTKernel-32 Programming Manual Fine Time Arithmetic Functions Time Interval Measurements |
Time Interval MeasurementsThe following functions calculate the time elapsed since a call to FTReadTime and convert the result to seconds, milliseconds, microseconds, or nanoseconds: RTKFTIMEINT FTElapsedSeconds (const RTKFineTime * T); RTKFTIMEINT FTElapsedMilliSecs(const RTKFineTime * T); RTKFTIMEINT FTElapsedMicroSecs(const RTKFineTime * T); RTKFTIMEINT FTElapsedNanoSecs (const RTKFineTime * T); The parameters (*T) must have been initialized with a call to FTReadTime. These functions return the time elapsed since the respective call to FTReadTime. Any number of independent time intervals can be measured in this way. The return values are always rounded down. The range of these functions is limited. For example, if RTKFTIMEINT is a 32-bit integer, FTElapsedNanoSecs is limited to about 4 seconds, FTElapsedMicroSecs to about 72 minutes, FTElapsedMilliSecs to about 50 days, and FTElapsedSeconds to 136 years. When these limits are exceeded, the function results are undefined.
|