CppELib 1.7.0
Loading...
Searching...
No Matches
WindowsOSWrapper::WindowsOneShotTimer Class Reference

Public Member Functions

 WindowsOneShotTimer (OSWrapper::Runnable *r, const char *name)
 
 ~WindowsOneShotTimer ()
 
void start (unsigned long timeInMillis)
 Start the timer.
 
void stop ()
 Stop the timer.
 
bool isStarted () const
 Return true if the timer is started.
 
void setName (const char *name)
 Set the object's name.
 
const char * getName () const
 Get the object's name.
 
- Public Member Functions inherited from OSWrapper::OneShotTimer
void setUncaughtExceptionHandler (UncaughtExceptionHandler *handler)
 Set the UncaughtExceptionHandler for this OneShotTimer.
 
UncaughtExceptionHandlergetUncaughtExceptionHandler () const
 Get the UncaughtExceptionHandler for this OneShotTimer.
 

Additional Inherited Members

- Static Public Member Functions inherited from OSWrapper::OneShotTimer
static void setDefaultUncaughtExceptionHandler (UncaughtExceptionHandler *handler)
 Set the default UncaughtExceptionHandler for all the OneShotTimer.
 
static UncaughtExceptionHandlergetDefaultUncaughtExceptionHandler ()
 Get the default UncaughtExceptionHandler.
 
static OneShotTimercreate (Runnable *r, const char *name="")
 Create an OneShotTimer object.
 
static void destroy (OneShotTimer *t)
 Destroy an OneShotTimer object.
 
- Protected Member Functions inherited from OSWrapper::OneShotTimer
 OneShotTimer (Runnable *r)
 
virtual ~OneShotTimer ()
 
void timerMain ()
 Common timer main method.
 

Constructor & Destructor Documentation

◆ WindowsOneShotTimer()

WindowsOSWrapper::WindowsOneShotTimer::WindowsOneShotTimer ( OSWrapper::Runnable r,
const char *  name 
)
inline

◆ ~WindowsOneShotTimer()

WindowsOSWrapper::WindowsOneShotTimer::~WindowsOneShotTimer ( )
inline

Member Function Documentation

◆ getName()

const char * WindowsOSWrapper::WindowsOneShotTimer::getName ( ) const
inlinevirtual

Get the object's name.

Returns
The object's name

Implements OSWrapper::OneShotTimer.

◆ isStarted()

bool WindowsOSWrapper::WindowsOneShotTimer::isStarted ( ) const
inlinevirtual

Return true if the timer is started.

Return values
trueThe timer is already started
falseThe timer is already stopped

Implements OSWrapper::OneShotTimer.

◆ setName()

void WindowsOSWrapper::WindowsOneShotTimer::setName ( const char *  name)
inlinevirtual

Set the object's name.

Parameters
nameThe object's name

Implements OSWrapper::OneShotTimer.

◆ start()

void WindowsOSWrapper::WindowsOneShotTimer::start ( unsigned long  timeInMillis)
inlinevirtual

Start the timer.

After the timeInMillis elapses, the timer calls Runnable::run() specified at create(). When the timer is fired one time, the timer is stopped.

Parameters
timeInMillisTime in milliseconds until the timer is fired
Note
If the timer is already started, do nothing.
If the timer is stopped, you can start() again.

Implements OSWrapper::OneShotTimer.

◆ stop()

void WindowsOSWrapper::WindowsOneShotTimer::stop ( )
inlinevirtual

Stop the timer.

Before the timer is fired, it stops the timer.

Note
If the timer is already stopped, do nothing.

Implements OSWrapper::OneShotTimer.


The documentation for this class was generated from the following file: