[time-ticker] adding 'TimeTicker' class (#5379)

This commit adds `TimeTicker` class which emits periodic ticks (with
one second period interval) to a set of registered tick receiver
modules. The `TimeTicker` would invoke `HandleTimeTick()` method
periodically on the registered receiver objects.

The `TimeTicker` model helps simplify the implementation of many
modules (such as `MeshForwarder`, `MleRoutuer`, `AddressResolver`,
`Ip6`, `DuaManager`, etc) which require periodic update/check of some
state (avoid each class using its own timer).
This commit is contained in:
Abtin Keshavarzian
2020-08-19 14:04:41 -07:00
committed by GitHub
parent e1cc23ce48
commit 8fd46dde18
25 changed files with 370 additions and 171 deletions
+1
View File
@@ -191,6 +191,7 @@ LOCAL_SRC_FILES := \
src/core/common/settings.cpp \
src/core/common/string.cpp \
src/core/common/tasklet.cpp \
src/core/common/time_ticker.cpp \
src/core/common/timer.cpp \
src/core/common/tlvs.cpp \
src/core/common/trickle_timer.cpp \