| |
|
|
|
And if I now not neustarten should had I even the complete Posting dispatching can.
Nachtrag:
however, CompileMarkSeparation shows, that winmm.dlls timeGetTime() not only accurate, separate too faster as &getTickCount is. |
|
|
| |
|
|
|
Jörg Sellmeyer | |
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 04/27/09 ▲ |
|
|
|
|
RGH | ... where me the Thread on it reminds, I these functions for Systemvariable &GetTickCount always time austtauschen wished. and before ichs again forget, have I it now same Done. in the next XProfan-Version hide itself behind &GetTickCount The Api TimeGetTime.
Greeting Roland |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 04/27/09 ▲ |
|
|
|
|
Frank Abbing | One old hat watts time again ausgegraben.
Roland: go a step moreover and write too Sleep circa. |
|
|
| |
|
|
|
Sebastian König | Frabbing, Beitrag=52083, Zeitpunkt=28.04.2009
One old hat watts time again ausgegraben.
Roland: go a step moreover and write so too Sleep circa.
the would a integrally code idea! Sleep with Loop, The The Time abfragt, would letztlich only one Busy Wait and runs so the idea behind Sleep against...
MfG
Sebastian |
|
|
| Windows XP, XProfan/Profan² 4.5 bis 11 Profan2Cpp-Homepage: [...] Alte Profan²-Seite: [...] | 04/28/09 ▲ |
|
|
|
|
| Frabbing, Beitrag=52083, Zeitpunkt=28.04.2009
One old hat watts time again ausgegraben.
very, shows but: One guter hat to incorrect Time is similar relevant like a badly to right.
behave itself a little Perhaps How in the Heisenbergsche Unschärferelation described - but since is well sooner Sebastian our Crack . |
|
|
| |
|
|
|
RGH | iF, Beitrag=52085, Zeitpunkt=28.04.2009
Frabbing, Beitrag=52083, Zeitpunkt=28.04.2009One old hat watts time again ausgegraben. very, shows but: One guter hat to incorrect Time is similar relevant like a badly to right. behave itself a little Perhaps How in the Heisenbergsche Unschärferelation described - but since is well sooner Sebastian our Crack .
now, in this drop was is well one old hat to right Time, because I had my Delphi-IDE with the XProfan-proposition open and could whom replacement the API-function manage, before ichs again forget!
Greeting Roland
Nachsatz: what the Sleep concerns has Sebastian naturally right: the would then what integrally other (see API-Doku To Sleep): Sleep gives first of all once whom processor for others anstehenden releases spare, wait then at least (!) The angegebene amount Millisekunden and claim then whom processor again for the Program. self at Parameter 0 becomes first of all the processor released, though only circa itself immediate again its services To assure. (with one Sleep 0 on the rechten Space can accordingly wirkungsvoll prevent, that his Program 100% Processor load causes without it too ardent auszubremsen. particularly with more rake-creep can such a thing one blessings his, if one z.B. yet surfing or play wants, during PC for a How wild ackert.) naturally could one z.B. one WAIT program, that The exakten Millisekunden wait, but the might then whom processor not enable, circa on any Cases timely go on to, and would sooner To such unfreundlichen Programs lead, The windows ausbremsen. and the wants Yes really none. |
|
|
| Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 04/28/09 ▲ |
|
|
|
|
Frank Abbing |
Sleep with Loop, The The Time abfragt, would letztlich only one Busy Wait and runs so the idea behind Sleep against...
I thought sooner on it WaitForSingleObject with a Semaphorenobjekt into Wartephasen (each 1 ms) or only WaitForSingleObject with the suitable Abbruchszeitraum To use. can naturally his, that The API just as inaccurate operates How Sleep (habs not yet tested), but a attempt would it Yes worth. my suggestion aimed on small Zeiträume of a couple Millisekunden, nobody wants to system for sec or longer nobble. The Idea, The behind Sleep stick, Although well, The process but badly. The present Prozessoren works so quick, I a inaccuracy of 15-16 ms per benutztem Sleep for fahrlässig stops. |
|
|
| |
|
|
|
| Kannste still yourself, above-mentioned scheduler (Image) shows still the on normalen Computern More as 1 X-Tick per MS possible is.
means Why not simply do{ case zeitAlle : break } - would still MS-very, except vlt. on Uraltkrücken... |
|
|
| |
|
|
|
Frank Abbing | Yes, I had right, How the example shows: 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$=myxprofan
sema&=CreateSemaphore(0,1,1,Addr(text$))
WhileLoop 2000
AddString Wert in ms: +Str$(timeGetTime())
WaitForSingleObject(sema&,5) 5 ms
EndWhile
ListBox$(Counter,2)
timeEndPeriod(1)
CloseHandle(sema&)
End
The Zeitmessung results (How tuned) in the 5 ms-beat (no his, that AddStrings Schonmal a ms verschluckt). The CPU-Auslastung lying with zero. the might for Sleep one genauerer substitute his.
behave itself a little Perhaps How in the Heisenbergsche Unschärferelation described - but since is well sooner Sebastian our Crack .
likes his. my Solution functions nevertheless. |
|
|
| |
|
|
|
Frank Abbing |
Kannste still yourself, above-mentioned scheduler (Image) shows still the on normalen Computern More as 1 X-Tick per MS possible is. means Why not simply do{ case zeitAlle : break } - would still MS-very, except vlt. on Uraltkrücken...
It's all right Yes therefore, that Sleep not millisekunden-very operates. with the GetTick-substitute work I already long. even my junior using it for its Woormy. I speech but from Sleep. |
|
|
| |
|
|
|
| |
|
| |
|
|