From 846bde90e6b1001480016fa46a957a9e726af68a Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 19 Mar 2012 16:59:53 +0000 Subject: [time] Define an API for getting the current time Signed-off-by: Michael Brown --- src/include/ipxe/null_time.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/include/ipxe/null_time.h (limited to 'src/include/ipxe/null_time.h') diff --git a/src/include/ipxe/null_time.h b/src/include/ipxe/null_time.h new file mode 100644 index 000000000..2b72cdf50 --- /dev/null +++ b/src/include/ipxe/null_time.h @@ -0,0 +1,23 @@ +#ifndef _IPXE_NULL_TIME_H +#define _IPXE_NULL_TIME_H + +/** @file + * + * Nonexistent time source + * + */ + +FILE_LICENCE ( GPL2_OR_LATER ); + +#ifdef TIME_NULL +#define TIME_PREFIX_null +#else +#define TIME_PREFIX_null __null_ +#endif + +static inline __always_inline time_t +TIME_INLINE ( null, time_now ) ( void ) { + return 0; +} + +#endif /* _IPXE_NULL_TIME_H */ -- cgit v1.2.3-55-g7522