10 FILE_LICENCE ( GPL2_OR_LATER );
14 #include <config/time.h>
17 * Calculate static inline time API function name
19 * @v _prefix Subsystem prefix
20 * @v _api_func API function
21 * @ret _subsys_func Subsystem API function
23 #define TIME_INLINE( _subsys, _api_func ) \
24 SINGLE_API_INLINE ( TIME_PREFIX_ ## _subsys, _api_func )
27 * Provide a time API implementation
29 * @v _prefix Subsystem prefix
30 * @v _api_func API function
31 * @v _func Implementing function
33 #define PROVIDE_TIME( _subsys, _api_func, _func ) \
34 PROVIDE_SINGLE_API ( TIME_PREFIX_ ## _subsys, _api_func, _func )
37 * Provide a static inline time API implementation
39 * @v _prefix Subsystem prefix
40 * @v _api_func API function
42 #define PROVIDE_TIME_INLINE( _subsys, _api_func ) \
43 PROVIDE_SINGLE_API_INLINE ( TIME_PREFIX_ ## _subsys, _api_func )
45 /* Include all architecture-independent time API headers */
46 #include <ipxe/null_time.h>
47 #include <ipxe/linux/linux_time.h>
49 /* Include all architecture-dependent time API headers */
50 #include <bits/time.h>
53 * Get current time in seconds
55 * @ret time Time, in seconds
57 time_t time_now ( void );
59 #endif /* _IPXE_TIME_H */