https://man7.org/linux/man-pages/man2/timerfd_create.2.html
https://cs.android.com/android/platform/superproject/+/master:frameworks/native/services/surfaceflinger/Scheduler/src/Timer.cpp;l=109;drc=c4ad8bc669e66262a00798b57132347a0d0aa2ac;bpv=0;bpt=1
these system calls create and operate on a timer that delivers
timer expiration notifications via a file descriptor. They
provide an alternative to the use of setitimer(2) or
timer_create(2), with the advantage that the file descriptor may
be monitored by select(2), poll(2), and epoll(7).
使用流程:
mTimerFd = timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC | TFD_NONBLOCK);
设置:
timerfd_settime(mTimerFd, TFD_TIMER_ABSTIME, &new_timer, &old_timer)
取消:
timerfd_settime(mTimerFd, 0, &new_timer, &old_timer)