Skip to content

Commit

Permalink
Timesync: Force call to delegate so we get time source
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille committed Sep 22, 2023
1 parent d64fd13 commit 422c385
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,10 @@ void TimeSynchronizationServer::Init()
{
ClearDSTOffset();
}
System::Clock::Microseconds64 utcTime;

if (System::SystemClock().GetClock_RealTime(utcTime) == CHIP_NO_ERROR &&
!RuntimeOptionsProvider::Instance().GetSimulateNoInternalTime())
{
mGranularity = GranularityEnum::kMinutesGranularity;
}
// Set the granularity to none for now - this will force us to go to the delegate so it can
// properly report the time source
mGranularity = GranularityEnum::kNoTimeGranularity;

// This can error, but it's not clear what should happen in this case. For now, just ignore it because we still
// want time sync even if we can't register the deletgate here.
Expand Down

0 comments on commit 422c385

Please sign in to comment.