systime_t osGetSystemTime(void)
{
   systime_t time;

   //Get current tick count
   time = OS_GetTime32();

   //Convert system ticks to milliseconds
   return OS_SYSTICKS_TO_MS(time);
}
Esempio n. 2
0
systime_t osGetSystemTime(void)
{
   OS_ERR err;
   systime_t time;

   //Get current tick count
   time = OSTimeGet(&err);

   //Convert system ticks to milliseconds
   return OS_SYSTICKS_TO_MS(time);
}
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);
}