mirror of
https://github.com/espressif/openthread.git
synced 2026-07-25 21:44:07 +00:00
[timer] multiple microseconds timer support (#1962)
* [timer] multiple microseconds timer support * Remove TimerSchedulerLocator, Timer inherit from Ip6Locator instead to get TimerScheduler. * Add separate UsecTimer and UsecTimerScheduler for multiple microseconds timer support. * [timer] refine Timer names * Rename alarm header files to alarm-milli.h and alarm-micro.h * Rename alarm APIs to start with otPlatAlarmMilli and otPlatAlarmMicro * Rename Timer classes to TimerMilli/TimerMilliScheduler and TimerMicro/TimerMicroScheduler * [Timer] Refactor Timer code structure * Create TimerBase and TimerSchedulerBase class for common functions; * Use TimerMilli/TimerMicro and TimerMilliScheduler/TimerMicroScheduler for different functions; * Define AlarmApi, so then TimerMilliScheduler/TimerMicroScheduler could use different AlarmApi.
This commit is contained in:
@@ -317,7 +317,8 @@ otError otThreadGetParentInfo(otInstance *aInstance, otRouterInfo *aParentInfo)
|
||||
aParentInfo->mPathCost = parent->GetCost();
|
||||
aParentInfo->mLinkQualityIn = parent->GetLinkInfo().GetLinkQuality(aInstance->mThreadNetif.GetMac().GetNoiseFloor());
|
||||
aParentInfo->mLinkQualityOut = parent->GetLinkQualityOut();
|
||||
aParentInfo->mAge = static_cast<uint8_t>(Timer::MsecToSec(Timer::GetNow() - parent->GetLastHeard()));
|
||||
aParentInfo->mAge = static_cast<uint8_t>(TimerMilli::MsecToSec(TimerMilli::GetNow() -
|
||||
parent->GetLastHeard()));
|
||||
aParentInfo->mAllocated = parent->IsAllocated();
|
||||
aParentInfo->mLinkEstablished = parent->GetState() == Neighbor::kStateValid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user