class UtcTimeProvider
Defined at line 20 of file ../../src/developer/forensics/utils/utc_time_provider.h
Provides the UTC time only if the device's UTC clock has achieved logging quality.
Can be configured to record the UTC-boot difference from the previous boot by providing a
non-nullopt |utc_boot_difference_path|.
Public Methods
void UtcTimeProvider (UtcClockReadyWatcherBase * utc_clock_ready_watcher, timekeeper::Clock * clock)
Defined at line 16 of file ../../src/developer/forensics/utils/utc_time_provider.cc
void UtcTimeProvider (UtcClockReadyWatcherBase * utc_clock_ready_watcher, timekeeper::Clock * clock, PreviousBootFile utc_boot_difference_file)
Defined at line 20 of file ../../src/developer/forensics/utils/utc_time_provider.cc
std::optional<timekeeper::time_utc> CurrentTime ()
Returns the current UTC time if the device's UTC time is accurate, std::nullopt otherwise.
Defined at line 47 of file ../../src/developer/forensics/utils/utc_time_provider.cc
std::optional<zx::duration> CurrentUtcBootDifference ()
Returns the difference between the UTC clock and the device's boot time if the device's UTC
time is accurate, std::nullopt otherwise.
This value can be added to a boot time to convert it to a UTC time.
Defined at line 55 of file ../../src/developer/forensics/utils/utc_time_provider.cc
std::optional<zx::duration> PreviousBootUtcBootDifference ()
Defined at line 71 of file ../../src/developer/forensics/utils/utc_time_provider.cc