BusBricks: arduinoMocking::MockTime Class Reference
BusBricks  0.1
Customize bus-communication
Loading...
Searching...
No Matches
arduinoMocking::MockTime Class Reference

Simulates Arduino's time functions for testing purposes. More...

#include <mockArduino.h>

Public Member Functions

 MockTime ()
 Constructs a MockTime object and initializes the start time.
 
unsigned long millis () const
 Returns the simulated time in milliseconds.
 
unsigned long micros () const
 Returns the simulated time in microseconds.
 

Detailed Description

Simulates Arduino's time functions for testing purposes.

This class provides methods to get simulated time in milliseconds and microseconds.

Member Function Documentation

◆ micros()

unsigned long arduinoMocking::MockTime::micros ( ) const

Returns the simulated time in microseconds.

Returns
The number of microseconds since the start time, including any simulated time.
Here is the caller graph for this function:

◆ millis()

unsigned long arduinoMocking::MockTime::millis ( ) const

Returns the simulated time in milliseconds.

Returns
The number of milliseconds since the start time, including any simulated time.
Here is the caller graph for this function:

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