ArvernOS
Loading...
Searching...
No Matches
fake_clock.h File Reference
#include <stdint.h>
Include dependency graph for fake_clock.h:

Functions

void fake_clock_init ()
 
uint64_t fake_clock_get_current_microseconds ()
 

Detailed Description

The fake clock is a fake implementation of a hardware clock (e.g., a Real-Time Clock module). The clock is initialized at build time by injecting the current build time (in nanoseconds). Note that this clock also requires the system timer to update itself.

This clock should be used when the target architecture/board does not have a hardware clock. Use CONFIG_USE_FAKE_CLOCK=1 to enable it.

Function Documentation

◆ fake_clock_get_current_microseconds()

uint64_t fake_clock_get_current_microseconds ( )

Returns the current system time in microseconds.

Returns
the current system time in microseconds

◆ fake_clock_init()

void fake_clock_init ( )

Initializes a fake clock.