\r
static DWORD WINAPI prvSimulatedPeripheralTimer( LPVOID lpParameter )\r
{\r
+portTickType xMinimumWindowsBlockTime = ( portTickType ) 20;\r
+\r
/* Just to prevent compiler warnings. */\r
( void ) lpParameter;\r
\r
time, not the time that Sleep() is called. It is done this way to \r
prevent overruns in this very non real time simulated/emulated \r
environment. */\r
- Sleep( portTICK_RATE_MS );\r
-\r
+ if( portTICK_RATE_MS < xMinimumWindowsBlockTime )\r
+ {\r
+ Sleep( xMinimumWindowsBlockTime );\r
+ }\r
+ else\r
+ {\r
+ Sleep( portTICK_RATE_MS );\r
+ }\r
+ \r
WaitForSingleObject( pvInterruptEventMutex, INFINITE );\r
\r
/* The timer has expired, generate the simulated tick event. */\r