iPXE
Defines | Functions | Variables
time.h File Reference

Time source. More...

#include <sys/time.h>
#include <ipxe/api.h>
#include <config/time.h>
#include <ipxe/null_time.h>
#include <ipxe/efi/efi_time.h>
#include <ipxe/linux/linux_time.h>
#include <bits/time.h>

Go to the source code of this file.

Defines

#define TIME_INLINE(_subsys, _api_func)   SINGLE_API_INLINE ( TIME_PREFIX_ ## _subsys, _api_func )
 Calculate static inline time API function name.
#define PROVIDE_TIME(_subsys, _api_func, _func)   PROVIDE_SINGLE_API ( TIME_PREFIX_ ## _subsys, _api_func, _func )
 Provide a time API implementation.
#define PROVIDE_TIME_INLINE(_subsys, _api_func)   PROVIDE_SINGLE_API_INLINE ( TIME_PREFIX_ ## _subsys, _api_func )
 Provide a static inline time API implementation.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
time_t time_now (void)
 Get current time in seconds (ignoring system clock offset)
static __attribute__ ((always_inline)) void time_adjust(signed long delta)
 Adjust system clock.

Variables

signed long time_offset
 Current system clock offset.

Detailed Description

Time source.

Definition in file time.h.


Define Documentation

#define TIME_INLINE (   _subsys,
  _api_func 
)    SINGLE_API_INLINE ( TIME_PREFIX_ ## _subsys, _api_func )

Calculate static inline time API function name.

Parameters:
_prefixSubsystem prefix
_api_funcAPI function
Return values:
_subsys_funcSubsystem API function

Definition at line 23 of file time.h.

#define PROVIDE_TIME (   _subsys,
  _api_func,
  _func 
)    PROVIDE_SINGLE_API ( TIME_PREFIX_ ## _subsys, _api_func, _func )

Provide a time API implementation.

Parameters:
_prefixSubsystem prefix
_api_funcAPI function
_funcImplementing function

Definition at line 33 of file time.h.

#define PROVIDE_TIME_INLINE (   _subsys,
  _api_func 
)    PROVIDE_SINGLE_API_INLINE ( TIME_PREFIX_ ## _subsys, _api_func )

Provide a static inline time API implementation.

Parameters:
_prefixSubsystem prefix
_api_funcAPI function

Definition at line 42 of file time.h.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
time_t time_now ( void  )

Get current time in seconds (ignoring system clock offset)

Return values:
timeTime, in seconds

Referenced by __attribute__().

static __attribute__ ( (always_inline)  ) [inline, static]

Adjust system clock.

Parameters:
deltaClock adjustment, in seconds

Definition at line 67 of file time.h.

References time_offset.

                                  {

        time_offset += delta;
}

Variable Documentation

signed long time_offset

Current system clock offset.

Definition at line 47 of file time.c.

Referenced by __attribute__().