diff --git a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SNTPClientTask.c b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SNTPClientTask.c index cd2b24f3932..161625935f2 100644 --- a/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SNTPClientTask.c +++ b/FreeRTOS-Plus/Demo/coreSNTP_Windows_Simulator/SNTPClientTask.c @@ -699,12 +699,12 @@ void calculateCurrentTime( UTCTime_t * pBaseTime, * UTC era 1. */ LogError( ( "UTC timestamp rollover." ) ); pCurrentTime->secs = ( uint32_t ) ( currentTimeSecs - UINT32_MAX - 1 ); - } else { pCurrentTime->secs = ( uint32_t ) ( currentTimeSecs ); } + pCurrentTime->msecs = msElapsedSinceLastSync % 1000; } else