iPXE
null_time.c File Reference

Nonexistent time source. More...

#include <ipxe/time.h>
#include <ipxe/timer.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static time_t null_now (void)
 Get current time in seconds.
 PROVIDE_TIME (null, time_now, null_now)

Detailed Description

Nonexistent time source.

Definition in file null_time.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ null_now()

time_t null_now ( void )
static

Get current time in seconds.

Return values
timeTime, in seconds

Definition at line 40 of file null_time.c.

40 {
41
42 /* Provide a non-absolute timer bassed on currticks() */
43 return ( currticks() / TICKS_PER_SEC );
44}
#define TICKS_PER_SEC
Number of ticks per second.
Definition timer.h:16
unsigned long currticks(void)
Get current system time in ticks.
Definition timer.c:43

References currticks(), and TICKS_PER_SEC.

Referenced by PROVIDE_TIME().

◆ PROVIDE_TIME()

PROVIDE_TIME ( null ,
time_now ,
null_now  )

References null_now(), and time_now().