mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[timer] fix elapsed overflow (#3789)
This commit fixes a bug in the commissioner when a joiner's expiration time has alerady elapsed. This commit also introduces convenience methods for computing time elapsed and diffs.
This commit is contained in:
+1
-1
@@ -2011,7 +2011,7 @@ void Interpreter::HandleIcmpReceive(Message & aMessage,
|
||||
|
||||
if (aMessage.Read(aMessage.GetOffset(), sizeof(uint32_t), ×tamp) >= static_cast<int>(sizeof(uint32_t)))
|
||||
{
|
||||
mServer->OutputFormat(" time=%dms", TimerMilli::GetNow() - HostSwap32(timestamp));
|
||||
mServer->OutputFormat(" time=%dms", TimerMilli::Elapsed(HostSwap32(timestamp)));
|
||||
}
|
||||
|
||||
mServer->OutputFormat("\r\n");
|
||||
|
||||
Reference in New Issue
Block a user