1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 #ifndef __SYS_TIME_H__
5 #define __SYS_TIME_H__
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 #include "plat_types.h"
12 #include "hal_cmu.h"
13 #ifndef osCMSIS_FreeRTOS
14 #include <sys/time.h>
15 #else
16 #include "time.h"
17 #endif
18 
19 #ifdef __ARM_ARCH_ISA_ARM
20 int gettimeofday(struct timeval *__restrict __p, void *__restrict __tz);
21 #endif
22 
23 int gettimeready(void);
24 
25 void hal_sys_time_init(s32_t ntp_sec, u32_t frac);
26 
27 s32_t hal_sys_time_get(void);
28 
29 char *hal_sys_get_cur_time(void);
30 
31 time_t hal_sys_get_cur_rawtime(void);
32 
33 char *hal_sys_format_time(s32_t sec);
34 
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif
41 
42