Initial revision

This commit is contained in:
eck
1989-06-12 15:22:14 +00:00
parent a2db4a8b50
commit 5c6439d2e2
13 changed files with 687 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
/*
* time - return the current calendar time (seconds since jan 1, 1970)
*/
/* $Header$ */
#include <time.h>
#include <sys/time.h>
time_t
time(time_t *timer)
{
struct timeval tv;
struct timezone tz;
gettimeofday(&tv, &tz);
if (timer) *timer = tv.tv_sec;
return tv.tv_sec;
}