aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/null_time.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2012-03-19 16:59:53 +0000
committerMichael Brown <mcb30@ipxe.org>2012-03-19 22:13:27 +0000
commit846bde90e6b1001480016fa46a957a9e726af68a (patch)
treecf3dfaaef4c90864c11c707482fde92f49b4abf7 /src/include/ipxe/null_time.h
parentc130001bdfb2fa4c880b59f76340a91703ffcfc9 (diff)
downloadipxe-846bde90e6b1001480016fa46a957a9e726af68a.tar.gz
[time] Define an API for getting the current time
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/null_time.h')
-rw-r--r--src/include/ipxe/null_time.h23
1 files changed, 23 insertions, 0 deletions
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 */