| 37 | } |
| 38 | |
| 39 | static time_t get_timeout_sec(int fd) { |
| 40 | struct itimerspec curr_value; |
| 41 | if (timerfd_gettime(fd, &curr_value) == 0) { |
| 42 | return curr_value.it_value.tv_sec; |
| 43 | } |
| 44 | WARN("timerfd_gettime(%d) failed: %s\n", fd, strerror(errno)); |
| 45 | return 0; |
| 46 | } |
| 47 | |
| 48 | void reset_timer(int fd, int old_timer, int new_timer) { |
| 49 | if (old_timer <= 0) { |