The imaginary scenario:
There is an event loop (epoll) based processA which sometimes sends requests over network to another processB which runs on a different machine. ProcessA starts a timer asynchronously and waits for 10 seconds before giving up waiting for the response from processB. If the response from processB arrives within 10 seconds then the timer will be stopped.
The question is how would you implement this asynchronous timer in C on a Linux system?