I want to create a timer using timerfd_create, but i don’t know how to check for the expiry.
Can someone please help me with an easy example?
I know how to create and populate using the settime as you can see from my earlier timer questions, but how to check the expiry of timerfd_create? I know it notifies via file descriptor of it’s expiry. But how to check it?
Thanks in advance.
You can use
selectorepollto monitor the file descriptor. Here’s an example: