Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

The Tsentry timer libraries encompass basic timer functions. These functions may be called by any application task to set and test timers. The timer values are allocated and maintained in user defined variables and are tested by user calls.

 Overview

These functions  

 Class Interface

The following public functions are provided as part of the tpriTimer support:

  • TIMERVAL SetUTimer (int us);
    Return the value of a timer that will expire in 'us' microseconds.
    If us = 0, turn timer off

  • TIMERVAL SetMTimer (int ms);
    Return the value of a timer that will expire in 'ms' milliseconds.
    If ms = 0, turn timer off

  • TIMERVAL SetSTimer (int s);
    Return the value of a timer that will expire in 's' seconds.
    If s = 0, turn timer off

  • TIMERVAL AddUTimer (TIMERVAL timer, int us);
    Return the value of a timer that is set to expire 'us' microseconds after (if 'us' is positive) or before (if 'us' is negative) the timer value passed in 'timer'.  The current passed 'timer' may be scheduled to expire in the future or may have already expired.  If 'timer' is off (inactive), set the timer to expire 'us' microseconds into the future.

  • TIMERVAL AddMTimer (int ms);
    Return the value of a timer that is set to expire 'ms' milliseconds after (if 'ms' is positive) or before (if 'ms' is negative) the timer value passed in 'timer'.  The current passed 'timer' may be scheduled to expire in the future or may have already expired. If 'timer' is off (inactive), set the timer to expire 'us' microseconds into the future.

  • TIMERVAL AddSTimer (int s);
    Return the value of a timer that is set to expire 's' seconds after (if 's' is positive) or before (if 's' is negative) the timer value passed in 'timer'.  The current passed 'timer' may be scheduled to expire in the future or may have already expired.  If 'timer' is off (inactive), set the timer to expire 'us' microseconds into the future.

  • __int64 RemUTimer (TIMERVAL timer);
    Return the value of the time in microseconds remaining on timer 'timer'.  If the timer has already expired, return the number of microseconds in the past as a negative number.  If the timer is off (inactive), return a value of zero.

  • TIMERVAL AddMTimer (int ms);
    Return the value of the time in milliseconds remaining on timer 'timer'.  If the timer has already expired, return the number of milliseconds in the past as a negative number.  If the timer is off (inactive), return a value of zero.

  • TIMERVAL AddSTimer (int s);
    Return the value of the time in seconds remaining on timer 'timer'.  If the timer has already expired, return the number of seconds in the past as a negative number.  If the timer is off (inactive), return a value of zero

  • int TstTimer(TIMERVAL timer);
    Test for current status of the timer 'timer'
    Return value as as follows:
    +1 = Timer still active and not timed out yet
    0  = Timer is off (inactive)
    -1 = Timer has timed out

  • No labels