systime_t osGetSystemTime(void) { systime_t time; #if defined(osCMSIS_RTX) //Forward function declaration extern uint32_t rt_time_get(void); //Get current tick count time = rt_time_get(); #else //Get current tick count time = osKernelSysTick(); #endif //Convert system ticks to milliseconds return OS_SYSTICKS_TO_MS(time); }
IMAGE2_TEXT_SECTION uint32_t millis( void ) { // OS_TICK = 1000, so the same as ticks return rt_time_get() ; }