CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2013/03/10 17:32:53
Modified files:
usr.sbin/relayd: check_icmp.c hce.c log.c pfe.c relay.c
relay_http.c relay_udp.c relayd.c relayd.h
usr.sbin/relayctl: relayctl.c
Log message:
This diff changes relayd to use the monotonic clock instead of
gettimeofday(). It was also bugging me for some time to have all
these checks of gettimeofday()'s return value: it should not fail. So
this diff introduces a void getmonotime(struct timeval *tv) that calls
clock_gettime(CLOCK_MONOTONIC, &ts) and converts the output to a
struct timeval that can be used with the existing code and the
timeval-specific timer functions (timerclear, timersub, ...). It does
not return a status but calls fatal() on error-that-should-not-happen.
ok sthen@ chris@