MCPcopy Create free account
hub / github.com/FreeRTOS/FreeRTOS-Kernel / prvSampleTimeNow

Function prvSampleTimeNow

timers.c:714–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712/*-----------------------------------------------------------*/
713
714 static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched )
715 {
716 TickType_t xTimeNow;
717 PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */
718
719 xTimeNow = xTaskGetTickCount();
720
721 if( xTimeNow < xLastTime )
722 {
723 prvSwitchTimerLists();
724 *pxTimerListsWereSwitched = pdTRUE;
725 }
726 else
727 {
728 *pxTimerListsWereSwitched = pdFALSE;
729 }
730
731 xLastTime = xTimeNow;
732
733 return xTimeNow;
734 }
735/*-----------------------------------------------------------*/
736
737 static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer,

Callers 2

Calls 2

xTaskGetTickCountFunction · 0.85
prvSwitchTimerListsFunction · 0.85

Tested by

no test coverage detected