Re: [RFCv2 1/2] misc: Add timer API


Benjamin Walsh <benjamin.walsh@...>
 

On Mon, Apr 25, 2016 at 02:08:00PM +0200, Tomasz Bursztyka wrote:
Hi Benjamin,

2. I am not sure about the naming. This is yet another timer library,
when we already have nano timers and micro timers. What makes it special
is its callback functionality. Can we try to get that into the name ?
Sure we can add a timeout or callback to the name, but IMO this would
be much more useful than nano_timer thus why I would like to promote
it over it.
Since nobody is suggesting anything here are some alternatives:

sys_timer_callback*: quite long imo
sys_callback: doesn't say much
sys_timeout: I would favor this one
Me too.

I would prefer sys_callback I think: you add a callback with a timeout
shows that there is a timeout/timer IMHO.
A timeout says all without people to read parameters. At a timeout
usually, it means you want to do something, thus the callback. It's
not suprizing timeout keyword is usually preferred in some user-land
libraries on Linux or else.
Don't you think it would be confusing for a user that we have two timer
APIs and a timeout API ?

Join devel@lists.zephyrproject.org to automatically receive all group messages.