patacongo edited a comment on pull request #784: URL: https://github.com/apache/incubator-nuttx-apps/pull/784#issuecomment-864336869
The driver really should handle multiple clients like most other drivers. That should be a requirement of all drivers, if possible, so I would personally consider that limitation a bug in this case. For a single timer, this could be handled by keeping a list of relative timer delays. This is done, for example, for the wdog timers. See https://github.com/apache/incubator-nuttx/blob/master/sched/wdog/wd_start.c#L226 . The wdog timers can handle an unlimited number of clients with a single timer and with NO additional overhead (at least after the relative delay is calculated). For example, if there are two active timers, one to expire in 1.0 seconds and on in 1.5 seconds. The delay on the first would be 1.0 seconds and the relative delay on the second would be 0.5 seconds. After the first timer expires and the signal is sent, an additional 0.5 second delay would be required for the 1.5 second delay. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org