English
Forum

SetTimer vs.. Sleep

 

Jörg
Sellmeyer
can me time someone explain, Why with SetTimer in link with WaitInput so gigantic differences in the comparison To Sleep appear.
loudly Profanhilfe are both command with Parameters To feed, The Millisekunden repräsentieren.
with Sleep comes the too about (is hold windows) there. SetTimer (sowohl Profan as well as by Api) in link with WaitInput are ca. 12-16 time slower!
a factor of 4-6 could I Yes understand, there Yes in the WaitInput what happens, but here would I me wish, that the something feiner getaktet go can.
CompileMarkSeparation
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/15/08  
 




Frank
Abbing
NT-versions having a stood off of 16 ms. Accurate goes it neither with Sleep.
 
09/15/08  
 




Jörg
Sellmeyer
Well, one sees Yes still a deutlichen Difference between Sleep and SetTimer.
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/15/08  
 



@Jörg: if it you circa Echtzeit weg ought to, Timer are for a Frame unfit - but well for recurring Events. Sleep is imho accurate as Timer.
 
09/15/08  
 




Frank
Abbing
the here's ms-very:
CompileMarkSeparation
Millisekunden-genaue Zeitmessung
ohne Hardwaretimer unter NT-Windows.
(c) Frank Abbing
Def timeGetTime(0)!"WINMM","timeGetTime"
Def timeBeginPeriod(1)!"WINMM","timeBeginPeriod"
Def timeEndPeriod(1)!"WINMM","timeEndPeriod"
timeBeginPeriod(1)
Sleep 32

WhileLoop 2000

    AddString "Wert in ms: "+Str$(timeGetTime())

EndWhile

ListBox$("Counter",2)
timeEndPeriod(1)
End
 
09/15/08  
 




Jörg
Sellmeyer
Very beautiful! so can in link with Sleep a Zeitabfrage create, The at least on 2 ms exactly and nevertheless not the system charged.
I can me dumpf remind, that You, the too Schonmal on a inquire of Georg posted have. thanks.
CompileMarkSeparation
Millisekunden-genaue Zeitmessung
ohne Hardwaretimer unter NT-Windows.
(c) Frank Abbing
Def timeGetTime(0)!"WINMM","timeGetTime"
Def timeBeginPeriod(1)!"WINMM","timeBeginPeriod"
Def timeEndPeriod(1)!"WINMM","timeEndPeriod"
timeBeginPeriod(1)
Sleep 32
Cls
Var n& = timeGetTime() + 100

While timeGetTime() < n&

    sleep 1
    AddString "Wert in ms: "+Str$(timeGetTime())
    Case Between(timeGetTime(),n&-42,n&-40):Print "a"

EndWhile

ListBox$("Counter",2)
timeEndPeriod(1)
WaitInput
End
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
09/15/08  
 




GDL
Hi,

I coming , with Frequenzmesser measured, too lest under 10 ms.
The problem by me is simply the executing Program, the unfortunately not Dauerprozess has.
for zeitkritische Messungen The I have, the µs area is there integrally normal, is windows not To use.

Hello
Georg
 
Windows7 Xprofan 8,9,10 [...]  [...] 
09/15/08  
 



Jupp because of the Zeitscheiben for Threads, möglicherweise increased one The accuracy with special Process-Prioritäten-Settings.
 
09/15/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

3.938 Views

Untitledvor 0 min.
Walter12/30/22
Georg Teles05/01/20
RudiB.04/28/20
Klaus Ernst09/22/14
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie