API Guides > ConceptRT 3.x
Timer Class Reference

Abstraction of a timer. More...

Detailed Description

Abstraction of a timer.

+ Inheritance diagram for Timer:

Public Member Methods

 Timer (TimeSpan interval)
 Constructor. More...
 
 ~Timer ()
 Destructor. More...
 
bool Wait (TimeSpan timeout=TimeInfinite)
 Waits. More...
 
bool GetEnabled () const
 Query if the timer is enabled. More...
 
void SetEnabled (bool value)
 Sets the timer as enabled. More...
 
TimeSpan GetInterval () const
 Gets the remaining interval. More...
 
void SetInterval (TimeSpan interval)
 Sets the interval of the timer. More...
 

Constructor & Destructor Documentation

Timer ( TimeSpan  interval)

Constructor.

Parameters
intervalThe interval.
Warning
Non-Deterministic. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.
~Timer ( )

Destructor.

Warning
Non-Deterministic. Determinism when using ConceptRT library can be ensure by using Context Time Critical mechanisms.

Methods Documentation

bool GetEnabled ( ) const

Query if the timer is enabled.

Returns
true if it is enable, false if it isn't.
TimeSpan GetInterval ( ) const

Gets the remaining interval.

Returns
The interval.
void SetEnabled ( bool  value)

Sets the timer as enabled.

Parameters
valuetrue to value.
void SetInterval ( TimeSpan  interval)

Sets the interval of the timer.

Parameters
intervalThe interval.
bool Wait ( TimeSpan  timeout = TimeInfinite)

Waits.

Parameters
timeout(optional) the timeout.
Returns
true if it succeeds, false if timeout occurs.