OSAPIOneShotTimer Class
The OSAPIOneShotTimer is a high-resolution one-shot timer, based on OSAPIPeriodicTimer. More...
Header: | #include <OSAPI/Timer/Timer.h> |
Inherits: | OSAPIPeriodicTimer |
Public Functions
OSAPIOneShotTimer() | |
int | ResetDelay(int delayInms) |
int | WaitForEvent() |
Reimplemented Public Functions
virtual int | Start(int delayInMs) override |
- 5 public functions inherited from OSAPIPeriodicTimer
Detailed Description
The OSAPIOneShotTimer is a high-resolution one-shot timer, based on OSAPIPeriodicTimer.
See also OSAPIPeriodicTimer, CDPTimer, CDPParameterTimer, CDPTimerMs, CDPParameterTimerMs, CDPTimerCounting, CDPRampTimer, and CDPComponent::RunInComponentThread.
Member Function Documentation
OSAPIOneShotTimer::OSAPIOneShotTimer()
Contructs an OSAPIOneShotTimer.
int OSAPIOneShotTimer::ResetDelay(int delayInms)
Resets timer delay.
delayInms: New delay in ms.
[override virtual]
int OSAPIOneShotTimer::Start(int delayInMs)
Reimplemented from OSAPIPeriodicTimer::Start().
Starts the timer.
Param int periodInMs: Timer tick event time period in ms.
Returns event handle != 0 on success.
int OSAPIOneShotTimer::WaitForEvent()
Waits for timer tick event or semaphore event set by SetEvent().
Blocks calling thread until timer event or semaphore event occurs.
Returns:
-1 | if no wait actually occured because the delay was calculated to less or equal to zero |
0 | if timer tick occured |
1 | if event occured |
Supposed to return 0 if both event and timer tick occured.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.