/* * Copyright (c) 1983 Regents of the University of California. * All rights reserved. * * %sccs.include.redist.c% */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)time.c 5.6 (Berkeley) 06/01/90"; #endif /* LIBC_SCCS and not lint */ #include #include time_t time(t) time_t *t; { struct timeval tt; if (gettimeofday(&tt, (struct timezone *)0) < 0) return(-1); if (t) *t = tt.tv_sec; return(tt.tv_sec); }