shithub: npe

ref: 3e659eda301488f5e86c68c81e2ff2a88b6755f9
dir: /libnpe/gettimeofday.c/

View raw version
#include <time.h>
#include "_npe.h"

int
gettimeofday(struct timeval *tp, struct timezone *tzp)
{
	long long t;

	USED(tzp);
	t = npe_nanosec();
	tp->tv_sec = t / Nsec;
	tp->tv_usec = (t / 1000ULL) % Nmsec;

	return 0;
}