cure cancer
[unix-history] / usr / src / lib / libc / gen / time.c
CommitLineData
d62fa457 1/* time.c 4.2 83/02/27 */
e8e7b5b4
SL
2
3/*
4 * Backwards compatible time call.
5 */
6#include <sys/types.h>
7#include <sys/time.h>
8
9time_t
10time(t)
11 time_t *t;
12{
13 struct timeval tt;
14
d62fa457 15 if (gettimeofday(&tt, (struct timezone *)0) < 0)
e8e7b5b4
SL
16 return (-1);
17 if (t)
18 *t = tt.tv_sec;
19 return (tt.tv_sec);
20}