mirror of
https://github.com/espressif/openthread.git
synced 2026-08-24 19:29:52 +00:00
[test] update AdvanceTime() in unit tests to handle overflow (#8244)
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "common/arg_macros.hpp"
|
||||
#include "common/array.hpp"
|
||||
#include "common/instance.hpp"
|
||||
#include "common/time.hpp"
|
||||
#include "net/icmp6.hpp"
|
||||
#include "net/nd6.hpp"
|
||||
|
||||
@@ -245,7 +246,7 @@ void AdvanceTime(uint32_t aDuration)
|
||||
|
||||
Log("AdvanceTime for %u.%03u", aDuration / 1000, aDuration % 1000);
|
||||
|
||||
while (sAlarmTime <= time)
|
||||
while (TimeMilli(sAlarmTime) <= TimeMilli(time))
|
||||
{
|
||||
ProcessRadioTxAndTasklets();
|
||||
sNow = sAlarmTime;
|
||||
|
||||
Reference in New Issue
Block a user