MCPcopy Create free account
hub / github.com/FedeDP/Clight / get_timeout_sec

Function get_timeout_sec

src/utils/timer.c:39–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static 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
48void reset_timer(int fd, int old_timer, int new_timer) {
49 if (old_timer <= 0) {

Callers 1

reset_timerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected