nyenaceyg
Dołączył: 13 Gru 2010
Posty: 522
Przeczytał: 0 tematów
Ostrzeżeń: 0/5 Skąd: England
|
Wysłany: Śro 19:29, 06 Kwi 2011 Temat postu: Windows programming to achieve high-precision timi |
|
|
Windows programming to achieve high-precision timing
ess (hSystem, DRV module / / KillSystemTimer function address (FARPR0C) m-fpKillSysTimer = GetProcAddress (hSystem, { delete the system clock has been created , if any, KillTimer ();// create an instance of a callback function TimerFunc address m-fpTimerProc = MakeProcInstance ((FARPR0C) TimerFunc, m-hInstance); / / g,[link widoczny dla zalogowanych],] building system Clock m-hTimer = m-fpCreateSysTimer (wRes, ITI-fpTimerProc) voidCSysTimer:: KillTimer () {if (m-hTimer) {/ / Remove the front created by the CreateSystemTimer / / the system clock m-fpKillSysTimer (m_hTimer); m-hTimer一0 if (m-fpTimerProc) { instance of the release of the callback function address FreeProcInstance (m-fpTimerProc); m-fpTimerProc = NULL;)) 3 Conclusion of the two mentioned above, the application of high-precision clock control Method can require a higher accuracy of time where the use of , and in most cases can obtain satisfactory results. Windows multimedia timer which under normal circumstances have been able to meet the requirements, but there is still some time delay. Windows internal system time clock management function provides higher accuracy , but the technology is not perfect, the technology is not open , it is recommended only in the last resort use.
Post został pochwalony 0 razy
|
|