class FuchsiaSystemClock
Defined at line 35 of file ../../src/cobalt/bin/utils/clock.h
An implementation of FuchsiaSystemClockInterface that uses the UTC clock installed
in the runtime.
Public Methods
void FuchsiaSystemClock (async_dispatcher_t * dispatcher, inspect::Node node)
Construct a |FuchsiaSystemClock| that reads the UTC clock passed to the runtime.
Defined at line 16 of file ../../src/cobalt/bin/utils/clock.cc
void FuchsiaSystemClock (async_dispatcher_t * dispatcher, inspect::Node node, const zx::unowned_clock & clock)
Construct a |FuchsiaSystemClock| that uses the given |clock| to check if the clock is
started, but reads time off of the UTC clock passed to the runtime. This constructor is
only intended for testing this class.
Defined at line 19 of file ../../src/cobalt/bin/utils/clock.cc
std::optional<std::chrono::system_clock::time_point> now ()
Returns the current time once the Fuchsia timekeeper service reports that
the system clock has been initialized from an external source.
Defined at line 26 of file ../../src/cobalt/bin/utils/clock.cc
void AwaitExternalSource (std::function<void ()> callback)
Wait for the system clock to become accurate, then call the callback.
Uses a clock handle to wait for the SIGNAL_UTC_CLOCK_LOGGING_QUALITY signal to be asserted.
Defined at line 33 of file ../../src/cobalt/bin/utils/clock.cc