Skip to content

Commit 9b8106b

Browse files
committed
[Ameba] Add platform changes
* [Ameba] add platform changes when getting system time
1 parent 8f4c8b5 commit 9b8106b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platform/Ameba/SystemTimeSupport.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ ClockImpl gClockImpl;
4848

4949
Microseconds64 ClockImpl::GetMonotonicMicroseconds64(void)
5050
{
51-
return (Clock::Microseconds64(xTaskGetTickCount()) * configTICK_RATE_HZ);
51+
return Clock::Microseconds64(ameba_get_clock_time());
5252
}
5353

5454
Milliseconds64 ClockImpl::GetMonotonicMilliseconds64(void)
5555
{
56-
return (Clock::Milliseconds64(xTaskGetTickCount()));
56+
return std::chrono::duration_cast<Milliseconds64>(GetMonotonicMicroseconds64());
5757
}
5858

5959
CHIP_ERROR ClockImpl::GetClock_RealTime(Clock::Microseconds64 & curTime)

0 commit comments

Comments
 (0)