| |
|
|
| Frabbing, url=paules-pc-forum.de/forum/XProfan/114066-neues-sleep-millisekunden-genau.html, Zeitpunkt=28.04.2009
KompilierenMarcaSeparaciónDeclare text$,sema&
Def WaitForSingleObject(2)!kernel32,WaitForSingleObject
Def CreateSemaphore(4)!kernel32,CreateSemaphoreA
Def CloseHandle(1)!kernel32,CloseHandle
Def timeGetTime(0)!WINMM,timeGetTime
Def timeBeginPeriod(1)!WINMM,timeBeginPeriod
Def timeEndPeriod(1)!WINMM,timeEndPeriod
timeBeginPeriod(1)
text$=xprofan
sema&=CreateSemaphore(0,1,1,0)
WhileLoop 2000
AddString Wert in ms: +Str$(timeGetTime())
WaitForSingleObject(sema&,5)
EndWhile
ListBox$(Counter,2)
timeEndPeriod(1)
CloseHandle(sema&)
End
Referencia: Genauigkeit rechnerabhängig, oft 4ms. |
|
|
| |
|
|