1 $DragonFly: src/usr.sbin/ntpd/patches/Attic/util.c.patch,v 1.3 2005/04/14 10:31:27 joerg Exp $
3 --- util.c 25 Feb 2005 16:43:19 -0000 1.5
4 +++ util.c 12 Apr 2005 20:13:45 -0000
6 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
9 +#include <sys/types.h>
10 +#include <sys/sysctl.h>
15 return (tv.tv_sec + JAN_1970 + 1.0e-6 * tv.tv_usec);
19 +gettime_corrected(void)
21 + return (gettime() + getoffset());
28 + size_t len = sizeof(offset);
29 + if (sysctlbyname("kern.ntp.delta", &offset, &len, NULL, 0))
31 + return (offset * 1e-9);
35 d_to_tv(double d, struct timeval *tv)