Skip to content

Struct hal::mock::steady_clock

ClassList > hal > mock > steady_clock

mock steady_clock implementation for use in unit tests and simulations.

  • #include <steady_clock.hpp>

Inherits the following classes: hal::steady_clock

Public Functions

Type Name
void set_frequency (frequency_t p_frequency)
Set the frequency to be returned from frequency() __
void set_uptimes (std::queue< uptime_t > & p_uptime_values)
Queues the uptimes to be returned from uptimes()

Public Functions inherited from hal::steady_clock

See hal::steady_clock

Type Name
frequency_t frequency ()
Get the operating frequency of the steady clock.
uptime_t uptime ()
Get the current value of the steady clock.
virtual ~steady_clock () = default

Public Functions Documentation

function set_frequency

Set the frequency to be returned from frequency() __

inline void hal::mock::steady_clock::set_frequency (
    frequency_t p_frequency
) 

Parameters:

  • p_frequency - Frequency to return

function set_uptimes

Queues the uptimes to be returned from uptimes()

inline void hal::mock::steady_clock::set_uptimes (
    std::queue< uptime_t > & p_uptime_values
) 

Parameters:

  • p_uptime_values - Queue of uptimes

The documentation for this class was generated from the following file libraries/include/libhal-mock/steady_clock.hpp