Пример #1
0
void TimerTuneMsDelay (TTimer *pThis)
{
	assert (pThis != 0);

	unsigned nTicks = TimerGetTicks (pThis);
	TimerMsDelay (pThis, 1000);
	nTicks = TimerGetTicks (pThis) - nTicks;

	unsigned nFactor = 100 * HZ / nTicks;

	pThis->m_nMsDelay = pThis->m_nMsDelay * nFactor / 100;
	pThis->m_nusDelay = (pThis->m_nMsDelay + 500) / 1000;

	//LoggerWrite (LoggerGet (), "timer", LogNotice, "SpeedFactor is %u.%02u", nFactor / 100, nFactor % 100);
}
Пример #2
0
void MsDelay (unsigned nMilliSeconds)
{
	TimerMsDelay (TimerGet (), nMilliSeconds);
}
Пример #3
0
void MsDelay(unsigned MilliSeconds)
{
	TimerMsDelay(MilliSeconds);
}