提供AliOS Things系统内核时间管理功能的基础API. 
◆ aos_calendar_localtime_get()
      
        
          | uint64_t aos_calendar_localtime_get  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
Get calendar time with utc offset.
- 返回
 - current calendar time with utc offset (unit:ms). 
 
 
 
◆ aos_calendar_time_get()
      
        
          | uint64_t aos_calendar_time_get  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
Get calendar time.
- 返回
 - current calendar time (unit:ms), for example, the number of milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC). 
 
 
 
◆ aos_calendar_time_set()
      
        
          | void aos_calendar_time_set  | 
          ( | 
          uint64_t  | 
          now_ms | ) | 
           | 
        
      
 
Set calendar time. 
- 参数
 - 
  
    | [in] | now_ms | the calender time (unit:ms) to set, for example, the number of milliseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).  | 
  
   
 
 
◆ aos_msleep()
      
        
          | void aos_msleep  | 
          ( | 
          uint32_t  | 
          ms | ) | 
           | 
        
      
 
Msleep.
- 参数
 - 
  
    | [in] | ms | sleep time in milliseconds.  | 
  
   
 
 
◆ aos_now()
      
        
          | uint64_t aos_now  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
Get current time in nanoseconds.
- 返回
 - elapsed time in nanoseconds from system starting. 
 
 
 
◆ aos_now_ms()
      
        
          | uint64_t aos_now_ms  | 
          ( | 
          void  | 
           | ) | 
           | 
        
      
 
Get current time in milliseconds.
- 返回
 - elapsed time in milliseconds from system starting. 
 
 
 
◆ aos_now_time_str()
Retrieves the timer string. Under RTOS w/o RTC, this fucntion will return the UTC time string that consider boot-up as 01-01 00:00:00.000. Under Linuxhost and compile option "vall=posix", this function will get the local time which considering time zone. 
- 参数
 - 
  
    | [out] | buf | give buffer to save timer string  | 
    | [in] | len | the length of buffer, recommand 19, right a terminating null-character is appended in last. | 
  
   
- 返回
 - 0: success.