class Clock
Defined at line 24 of file ../../src/lib/timekeeper/clock.h
Abstraction over the clock.
This class allows to retrieve the current time for any supported clock id.
This being a class, it allows to inject custom behavior for tests.
Public Methods
void Clock ()
Defined at line 26 of file ../../src/lib/timekeeper/clock.h
void ~Clock ()
Defined at line 27 of file ../../src/lib/timekeeper/clock.h
void Clock (const Clock & )
Defined at line 28 of file ../../src/lib/timekeeper/clock.h
Clock & operator= (const Clock & )
Defined at line 29 of file ../../src/lib/timekeeper/clock.h
zx_status_t UtcNow (time_utc * result)
Returns the current UTC time.
Defined at line 32 of file ../../src/lib/timekeeper/clock.h
zx::basic_time<((zx_clock_t)0)> MonotonicNow ()
Returns the current monotonic time. See |zx_clock_get_monotonic|.
Defined at line 40 of file ../../src/lib/timekeeper/clock.h
zx::basic_time<((zx_clock_t)1)> BootNow ()
Returns the current boot time. See |zx_clock_get_boot|.
Defined at line 43 of file ../../src/lib/timekeeper/clock.h
Protected Methods
zx_status_t GetUtcTime (zx_time_t * time)
Returns the current UTC time.
zx_instant_mono_t GetMonotonicTime ()
Returns the current monotonic time. See |zx_clock_get_monotonic|.
zx_instant_boot_t GetBootTime ()
Returns the current boot time. See |zx_clock_get_boot|.