File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / ntp / ports / winnt / libntp / util_clockstuff.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:08:38 2012 UTC (12 years, 10 months ago) by misho
Branches: ntp, MAIN
CVS tags: v4_2_6p5p0, v4_2_6p5, HEAD
ntp 4.2.6p5

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "ntp_syslog.h"
#include "ntp_stdlib.h"
#include "clockstuff.h"

int
gettimeofday(
	struct timeval *tv,
	int ignored
	)
{
	struct timespec ts;

	UNUSED_ARG(ignored);

	getclock(TIMEOFDAY, &ts);

	tv->tv_sec = ts.tv_sec;
	tv->tv_usec = ts.tv_nsec / 10;

	return 0;
}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>