This class is the MityDSP timer object. More...
#include <core/DspTimer.h>
Public Member Functions | |
tcDspTimer () | |
This constructor is used to create a timer and initialize it's state to off. | |
~tcDspTimer () | |
Default destructor. | |
void | set (int anDelta) |
This routine sets a timer with expiry anDelta ticks in the future. | |
bool | expired (int *apRemaining=NULL) |
This routine checks the status of a timer, returning a boolean stating whether or not it has expired. | |
void | cancel (void) |
This routine clears a timer by disabling it. | |
void | sleep (void) |
This routine puts the calling thread to sleep until the timer expires. | |
bool | enabled () const |
return true if timer is enabled |
This class is the MityDSP timer object.
tcDspTimer::tcDspTimer | ( | ) |
This constructor is used to create a timer and initialize it's state to off.
tcDspTimer::~tcDspTimer | ( | ) |
Default destructor.
void tcDspTimer::set | ( | int | anDelta | ) |
This routine sets a timer with expiry anDelta ticks in the future.
[in] | anDelta | Set timer to expiry in low resolution clock ticks |
bool tcDspTimer::expired | ( | int * | mnRemaining = NULL |
) |
This routine checks the status of a timer, returning a boolean stating whether or not it has expired.
If the optional int* is passed in, the time remaining until expiry is passed (and will be negative if past expiry).
[out] | mnRemaining | Amount of time remaining until expiry |
void tcDspTimer::cancel | ( | void | ) |
This routine clears a timer by disabling it.
void tcDspTimer::sleep | ( | void | ) |
This routine puts the calling thread to sleep until the timer expires.
bool MityDSP::tcDspTimer::enabled | ( | ) | const [inline] |
return true if timer is enabled