I have a PIC32MX460F512L running RTOS and I am looking for a way to get the difference in ms between two points in code.
This code below gets the tick time but not the time in ms.
static unsigned long gMSTP_timer_tick = 0 ;
void MSTP_timer_reset() {
gMSTP_timer_tick = xTaskGetTickCount( ) ;
}
FLOAT32 MSTP_timer_differences() {
unsigned long differences = xTaskGetTickCount( ) - gMSTP_timer_tick ;
gMSTP_timer_tick += differences ;
return (FLOAT32) differences ;
}
My question is
In free RTOS is there a way to get the current relative time in ms?