Skip to content

Commit

Permalink
[Ameba] simplified #if defined(CONFIG_ENABLE_AMEBA_SNTP) && (CONFIG_E…
Browse files Browse the repository at this point in the history
…NABLE_AMEBA_SNTP == 1) to #if CONFIG_ENABLE_AMEBA_SNTP
  • Loading branch information
pankore committed Nov 14, 2024
1 parent 53756b1 commit 7f79f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/Ameba/SystemTimeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Milliseconds64 ClockImpl::GetMonotonicMilliseconds64(void)

CHIP_ERROR ClockImpl::GetClock_RealTime(Clock::Microseconds64 & curTime)
{
#if defined(CONFIG_ENABLE_AMEBA_SNTP) && (CONFIG_ENABLE_AMEBA_SNTP == 1)
#if CONFIG_ENABLE_AMEBA_SNTP
time_t seconds = 0, uSeconds = 0;

if (matter_sntp_rtc_is_sync()) // if RTC is already sync with SNTP, read directly from RTC
Expand Down Expand Up @@ -111,7 +111,7 @@ CHIP_ERROR InitClock_RealTime()
Clock::Microseconds64((static_cast<uint64_t>(CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD) * UINT64_C(1000000)));
// Use CHIP_SYSTEM_CONFIG_VALID_REAL_TIME_THRESHOLD as the initial value of RealTime.
// Then the RealTime obtained from GetClock_RealTime will be always valid.
#if defined(CONFIG_ENABLE_AMEBA_SNTP) && (CONFIG_ENABLE_AMEBA_SNTP == 1)
#if CONFIG_ENABLE_AMEBA_SNTP
time_t seconds = 0, uSeconds = 0;

matter_sntp_init();
Expand Down

0 comments on commit 7f79f79

Please sign in to comment.