/********************************************************************************************************* ** 函数名称: API_TimeShow ** 功能描述: 打印操作系统时间信息 ** 输 入 : NONE ** 输 出 : NONE ** 全局变量: ** 调用模块: API 函数 (不得在中断中调用) *********************************************************************************************************/ LW_API VOID API_TimeShow (VOID) { printf("time show >>\n\n"); printf("Kernel Ticks: %-63llu\n", API_TimeGet64()); #if LW_CFG_RTC_EN > 0 { CHAR cTimeBuffer[32]; time_t time = lib_time(LW_NULL); printf("%s", lib_ctime_r(&time, cTimeBuffer)); } #else printf("\n"); #endif /* LW_CFG_RTC_EN > 0 */ }
/********************************************************************************************************* ** 函数名称: tick_get ** 功能描述: 获得系统 tick. ** 输 入 : NONE ** 输 出 : 系统 tick 计数. ** 全局变量: ** 调用模块: API 函数 *********************************************************************************************************/ LW_API uint64_t tick_get (void) { return ((uint64_t)API_TimeGet64()); }