mirror of
https://github.com/espressif/openthread.git
synced 2026-07-10 22:30:21 +00:00
f7fd2b0813
This commit adds a new static method `Timer::RemoveAll()` which removes all running timers from the `Scheduler`. This method is only intended for use by by `test_timer` unit test, allowing it to remove any timers that may be started from constructors of different objects in an OT instance before starting the unit test. With this change, we can have timers started from constructors. To ensure that the `RemoveAll()` is only used by the unit test, it is defined as a `protected` method which can still be used in the test which defines and uses `TestTimer` as a sub-class of `Timer`.