[riot-notifications] [RIOT-OS/RIOT] [WIP, RFC] doc/memos: Added RDM on high level timer API requirements and common features (#12970)

benpicco notifications at github.com
Mon Nov 9 17:47:40 CET 2020

As this seems to be the place to put general ideas about the high-level timer API, here is another one:

I think the high-level timer could be simplified if it configured the low-level timer in down-counting mode.
If we want to set a timeout in `n` ticks, right now we have to

 - get the current time
 - add `n`, make sure we did not overshoot already

instead, with down-counting timers we only have to

- set timeout to `n`

Now this simplifies the `set_timeout()` function at the expense of the `get_time()` function - however, I think the former is executed a lot more often. 

What do you think? 

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201109/a1968f8e/attachment.htm>

More information about the notifications mailing list