/* sets and returns current time from system time */ TIMEVAL set_time_now(void) { int old_errno = errno; /* init timer */ TIMER_RESET(time_now); monotonic_gettimeofday(&time_now); errno = old_errno; return time_now; }
/* sets and returns current time from system time */ timeval_t set_time_now(void) { int old_errno = errno; /* init timer */ timer_reset(time_now); monotonic_gettimeofday(&time_now); errno = old_errno; return time_now; }
/* current time */ TIMEVAL timer_now(void) { TIMEVAL curr_time; int old_errno = errno; /* init timer */ TIMER_RESET(curr_time); monotonic_gettimeofday(&curr_time); errno = old_errno; return curr_time; }
/* current time */ timeval_t timer_now(void) { timeval_t curr_time; int old_errno = errno; /* init timer */ timer_reset(curr_time); monotonic_gettimeofday(&curr_time); errno = old_errno; return curr_time; }