Skip to content

Commit

Permalink
Timesync: Force call to delegate so we get time source (project-chip#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cecille authored Sep 25, 2023
1 parent 699ff65 commit a51b2c5
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 a51b2c5

Please sign in to comment.