Module clock

Module clock 

Source

Structs§

MockTimeControl
Control handle for advancing mock time within a scope
MockTimeGuard
RAII guard for scoped mock time

Functions§

mock_time_advance
Advance mock time by specified milliseconds (convenience alias)
mock_time_advance_micros
Advance mock time by specified microseconds
mock_time_advance_millis
Advance mock time by specified milliseconds
mock_time_advance_nanos
Advance mock time by specified nanoseconds
mock_time_clear
Clear mock time override
mock_time_get
Get current mock time value in milliseconds (convenience alias)
mock_time_get_micros
Get current mock time value in microseconds
mock_time_get_millis
Get current mock time value in milliseconds
mock_time_get_nanos
Get current mock time value in nanoseconds
mock_time_is_active
Check if mock time is currently active
mock_time_scoped
Set mock time in milliseconds with RAII guard (convenience alias)
mock_time_scoped_micros
Set mock time in microseconds with RAII guard
mock_time_scoped_millis
Set mock time in milliseconds with RAII guard
mock_time_scoped_nanos
Set mock time with RAII guard that restores previous value
mock_time_set
Set mock time to a specific value in milliseconds (convenience alias)
mock_time_set_micros
Set mock time to a specific value in microseconds
mock_time_set_millis
Set mock time to a specific value in milliseconds
mock_time_set_nanos
Set mock time to a specific value in nanoseconds
mock_time_with
Run a function with mock time in milliseconds (convenience alias)
mock_time_with_control
Run a function with mock time that can be controlled
mock_time_with_micros
Run a function with mock time in microseconds
mock_time_with_millis
Run a function with mock time in milliseconds
mock_time_with_nanos
Run a function with mock time in nanoseconds
now
Get current time as DateTime Preserves nanosecond precision when available
now_micros
Get current time in microseconds since Unix epoch
now_millis
Get current time in milliseconds since Unix epoch
now_nanos
Get current time in nanoseconds since Unix epoch In release builds, this is a direct system call In debug builds, this checks for mock time override