mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
dm: sandbox: Add os_localtime() to obtain the system time
Add a function to read the system time into U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
aac5119822
commit
94eefdee2f
2 changed files with 29 additions and 0 deletions
11
include/os.h
11
include/os.h
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include <linux/types.h>
|
||||
|
||||
struct rtc_time;
|
||||
struct sandbox_state;
|
||||
|
||||
/**
|
||||
|
@ -277,4 +278,14 @@ int os_read_ram_buf(const char *fname);
|
|||
*/
|
||||
int os_jump_to_image(const void *dest, int size);
|
||||
|
||||
/**
|
||||
* Read the current system time
|
||||
*
|
||||
* This reads the current Local Time and places it into the provided
|
||||
* structure.
|
||||
*
|
||||
* @param rt Place to put system time
|
||||
*/
|
||||
void os_localtime(struct rtc_time *rt);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue