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

Public Member Functions

 WindowsPeriodicTimer (OSWrapper::Runnable *r, unsigned long periodInMillis, const char *name)
 
 ~WindowsPeriodicTimer ()
 
void start ()
 Start the timer.
 
void stop ()
 Stop the timer.
 
bool isStarted () const
 Return true if the timer is started.
 
unsigned long getPeriodInMillis () const
 Get the timer period (in milliseconds)
 
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::PeriodicTimer
void setUncaughtExceptionHandler (UncaughtExceptionHandler *handler)
 Set the UncaughtExceptionHandler for this PeriodicTimer.
 
UncaughtExceptionHandlergetUncaughtExceptionHandler () const
 Get the UncaughtExceptionHandler for this PeriodicTimer.
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ WindowsPeriodicTimer()

WindowsOSWrapper::WindowsPeriodicTimer::WindowsPeriodicTimer ( OSWrapper::Runnable r,
unsigned long  periodInMillis,
const char *  name 
)
inline

◆ ~WindowsPeriodicTimer()

WindowsOSWrapper::WindowsPeriodicTimer::~WindowsPeriodicTimer ( )
inline

Member Function Documentation

◆ getName()

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

Get the object's name.

Returns
The object's name

Implements OSWrapper::PeriodicTimer.

◆ getPeriodInMillis()

unsigned long WindowsOSWrapper::WindowsPeriodicTimer::getPeriodInMillis ( ) const
inlinevirtual

Get the timer period (in milliseconds)

Returns
Timer period (in milliseconds)

Implements OSWrapper::PeriodicTimer.

◆ isStarted()

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

Return true if the timer is started.

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

Implements OSWrapper::PeriodicTimer.

◆ setName()

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

Set the object's name.

Parameters
nameThe object's name

Implements OSWrapper::PeriodicTimer.

◆ start()

void WindowsOSWrapper::WindowsPeriodicTimer::start ( )
inlinevirtual

Start the timer.

When the timer period elapses, the timer calls Runnable::run() specified at create(). The timer calls the Runnable::run() per period.

Note
If the timer is already started, do nothing.
If the timer is stopped, you can start() again.

Implements OSWrapper::PeriodicTimer.

◆ stop()

void WindowsOSWrapper::WindowsPeriodicTimer::stop ( )
inlinevirtual

Stop the timer.

Note
If the timer is already stopped, do nothing.

Implements OSWrapper::PeriodicTimer.


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