IRremoteESP8266
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
TimerMs Class Reference

This class performs a simple timer in milli-seoncds since instantiated. More...

#include <IRtimer.h>

Public Member Functions

 TimerMs ()
 Class constructor. More...
 
void reset ()
 Resets the TimerMs object. More...
 
uint32_t elapsed ()
 Calculate how many milliseconds have elapsed since the timer was started. More...
 

Static Public Member Functions

static void add (uint32_t msecs)
 Add time to the timer to simulate elapsed time. More...
 

Private Attributes

uint32_t start
 

Detailed Description

This class performs a simple timer in milli-seoncds since instantiated.

Note
Handles when the system timer wraps around (once).

Constructor & Destructor Documentation

◆ TimerMs()

TimerMs::TimerMs ( )

Class constructor.

Member Function Documentation

◆ add()

void TimerMs::add ( uint32_t  msecs)
static

Add time to the timer to simulate elapsed time.

Parameters
[in]msecsNr. of mSeconds to be added.
Note
Only used in unit testing.

◆ elapsed()

uint32_t TimerMs::elapsed ( )

Calculate how many milliseconds have elapsed since the timer was started.

Returns
Nr. of milliseconds.

◆ reset()

void TimerMs::reset ( )

Resets the TimerMs object.

Member Data Documentation

◆ start

uint32_t TimerMs::start
private

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