MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / timerfd_time_operation

Function timerfd_time_operation

components/libc/posix/io/timerfd/timerfd.c:345–361  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

343}
344
345static void timerfd_time_operation(time_t *sec, long *nsec)
346{
347 if (*nsec < 0)
348 {
349 if (*sec > 0)
350 {
351 *sec -= 1;
352 *nsec = 1 * SEC_TO_NSEC + *nsec;
353 }
354 }
355
356 if (*sec < 0 || *nsec < 0)
357 {
358 *sec = 0;
359 *nsec = 0;
360 }
361}
362
363static int timerfd_do_settime(int fd, int flags, const struct itimerspec *new, struct itimerspec *old)
364{

Callers 2

timerfd_do_settimeFunction · 0.85
timerfd_do_gettimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected