diff options
Diffstat (limited to 'src/core/null_time.c')
| -rw-r--r-- | src/core/null_time.c | 14 |
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 ); |
