| |
|
|
| Frabbing, url=paules-pc-forum.de/forum/XProfan/114066-new-sleep-millisekunden-very.html, Zeitpunkt=28.04.2009
CompileMarkSeparationDeclare 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
Info: accuracy rechnerabhängig, often 4ms. |
|
|
| |
|
|