software/MFrame/commonFunctions/commonFunctions.cpp
/*----------------------------------------------------------------------*/
/* Sleep - pauses for a a certain amount of time, set by the parameter
/* sleepDuration. It's used to set a speed limit.
/*----------------------------------------------------------------------*/
pauses for a a certain amount of time, set by the parameter
sleepDuration. It's used to set a speed limit.
pauses for a a certain amount of time set by the parameter sleepDuration . It ' s used to set a speed limit .
void Sleep (int sleepDuration)
{
int targetTicks = TickCount() + sleepDuration;
	do
	{
	}
	while (TickCount() < targetTicks);			
}
void Sleep ( int sleepDuration ) { int targetTicks = TickCount ( ) + sleepDuration ; do { } while ( TickCount ( ) < targetTicks ) ; }
Sleep - pauses for a a certain amount of time, set by the parameter
sleepDuration.
Sleep - pauses for a a certain amount of time set by the parameter sleepDuration .
// Loop until TickCount() catches up.