summaryrefslogtreecommitdiffstats
path: root/src/core/null_time.c
diff options
context:
space:
mode:
authorSimon Rettberg2026-01-28 12:53:53 +0100
committerSimon Rettberg2026-01-28 12:53:53 +0100
commit8e82785c584dc13e20f9229decb95bd17bbe9cd1 (patch)
treea8b359e59196be5b2e3862bed189107f4bc9975f /src/core/null_time.c
parentMerge branch 'master' into openslx (diff)
parent[prefix] Make unlzma.S compatible with 386 class CPUs (diff)
downloadipxe-openslx.tar.gz
ipxe-openslx.tar.xz
ipxe-openslx.zip
Merge branch 'master' into openslxopenslx
Diffstat (limited to 'src/core/null_time.c')
-rw-r--r--src/core/null_time.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/null_time.c b/src/core/null_time.c
index 90041a456..15d8a57a5 100644
--- a/src/core/null_time.c
+++ b/src/core/null_time.c
@@ -30,5 +30,17 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
*/
#include <ipxe/time.h>
+#include <ipxe/timer.h>
-PROVIDE_TIME_INLINE ( null, time_now );
+/**
+ * Get current time in seconds
+ *
+ * @ret time Time, in seconds
+ */
+static time_t null_now ( void ) {
+
+ /* Provide a non-absolute timer bassed on currticks() */
+ return ( currticks() / TICKS_PER_SEC );
+}
+
+PROVIDE_TIME ( null, time_now, null_now );