Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following functions can be used to calculate the difference between two timer values.

Expand
titleElapUTimerDiffUTimer, ElapMTimerDiffMTimer, & ElapSTimerDiffSTimer
Code Block
int64_t delta = DiffUTimer(timer1, timer2)
   where:
      TIMERVAL timer1  = First timer
      TIMERVAL timer2  = Second timer

int64_t delta = DiffMTimer(timer1, timer2)
   where:
      TIMERVAL timer1  = First timer
      TIMERVAL timer2  = Second timer

int64_t delta = DiffSTimer(timer1, timer2)
   where:
      TIMERVAL timer1  = First timer
      TIMERVAL timer2  = Second timer

Calculates the difference between two timers (timer1 - timer2), returned in units of full microseconds, milliseconds, or seconds.

These functions work with both wall clock timers and set interval timers. If the two timers are of different types, the functions convert the set interval timer to a wall clock timer before calculating the difference.

If either timer is reset, then these functions will return zero.

...