Requirement is simple - Implement a C periodic timer, which can fire every say x seconds and a timer callback function should be called everytime that timer expires. Seems a simple enough question and I have browsed the web, but I am finding examples which either have FD and poll involved, or the timer callback is implemented using SIGNAL handler. I want to avoid both. Can you please share some code examples
https://man7.org/linux/man-pages/man2/timer_create.2.html - uses signals, which is not of interest to me as in my processes, there may be other reasons this SIGNAL can be called , how can I differentiate in the SIG-handler, that this signal is for my timer and not other events ?