For fast prototyping Service.timer decorator is enough, but for flexible solution this need to be improved because this do not allows to:
- Set timer interval at runtime (from config, cli, etc.)
- Stop timer
- Add timer at runtime
I think best approach here is pretty similar to others add_* methods. Something like add_timer will create new timer and return handle to manipulate (stop) it.
For fast prototyping
Service.timerdecorator is enough, but for flexible solution this need to be improved because this do not allows to:I think best approach here is pretty similar to others
add_*methods. Something likeadd_timerwill create new timer and return handle to manipulate (stop) it.