Skip to content

Commit

Permalink
Timesync: Force call to delegate so we get time source (#29440)
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille authored and pull[bot] committed Oct 31, 2023
1 parent 4351a64 commit 1019000
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,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 1019000

Please sign in to comment.