xref: /plan9/sys/src/ape/lib/bsd/gettimeofday.c (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1 #include <sys/types.h>
2 #include <time.h>
3 #include <sys/time.h>
4 
5 int
6 gettimeofday(struct timeval *tp, struct timezone *tzp)
7 {
8 	tp->tv_sec = time(0);
9 	tp->tv_usec = 0;
10 
11 	if(tzp) {
12 		tzp->tz_minuteswest = 240;
13 		tzp->tz_dsttime = 1;
14 	}
15 
16 	return 0;
17 }
18