From bd6805a8c18f859a8f467965f2ee780817d8a81e Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 19 Mar 2012 16:09:41 +0000 Subject: [libc] Add mktime() function Signed-off-by: Michael Brown --- src/include/sys/time.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/include/sys') diff --git a/src/include/sys/time.h b/src/include/sys/time.h index 21fb7e99d..6c9b7421b 100644 --- a/src/include/sys/time.h +++ b/src/include/sys/time.h @@ -1,20 +1,18 @@ #ifndef _SYS_TIME_H #define _SYS_TIME_H -#include +/** @file + * + * Date and time + */ -typedef unsigned long suseconds_t; +#include -struct timeval { - time_t tv_sec; /* seconds */ - suseconds_t tv_usec; /* microseconds */ -}; - -struct timezone { - int tz_minuteswest; /* minutes W of Greenwich */ - int tz_dsttime; /* type of dst correction */ -}; - -extern int gettimeofday ( struct timeval *tv, struct timezone *tz ); +/** Seconds since the Epoch + * + * We use a 64-bit type to avoid Y2K38 issues, since we may have to + * handle distant future dates (e.g. X.509 certificate expiry dates). + */ +typedef int64_t time_t; #endif /* _SYS_TIME_H */ -- cgit v1.2.3-55-g7522