ftp.nice.ch/pub/next/unix/network/system/bind-4.9.3pl1.NIHS.bd.tar.gz#/bind-4.9_3-REL/compat/lib/gettimeofday.c

This is gettimeofday.c in view mode; [Download] [Up]

#ifndef LINT
static char rcsid[] = "$Id: gettimeofday.c,v 8.1 1994/12/15 06:23:51 vixie Exp $";
#endif

#include "../../conf/portability.h"

#if !defined(NEED_GETTIMEOFDAY)
int __bindcompat_gettimeofday;
#else
int
gettimeofday(tvp, tzp)
	struct timeval *tvp;
	struct _TIMEZONE *tzp;
{
	time_t clock, time __P((time_t *));

	if (time(&clock) == (time_t) -1)
		return (-1);
	if (tvp) {
		tvp->tv_sec = clock;
		tvp->tv_usec = 0;
	}
	if (tzp) {
		tzp->tz_minuteswest = 0;
		tzp->tz_dsttime = 0;
	}
	return (0);
}

#endif /*NEED_GETTIMEOFDAY*/

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.