Jump to content

yupepa

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by yupepa

  1. After checking the details of timers, it seems that the problem is in the functions QueryPerformaceCounter and QueryPerformanceFrequency. There exists a blog concerning the problems with it: http://www.virtualdub.org/blog/pivot/entry.php?id=106 I found a suitable working solution for me, since i dont need the high accuracy, using the timeGetTime function with an accuray of 10ms. $begin = f_timeGetTime() Sleep(1234) $end = f_timeGetTime() $diff = $end - $begin MsgBox(0, "Timer1", "Diff = "&$diff) Func f_timeGetTime() Local $aResult = DllCall("winmm.dll", "long", "timeGetTime") If @error Then Return SetError(@error, @extended, -1) Return $aResult[0] EndFunc ;==>f_timeGetTime Maybe anybody has a better solution, so i leave the thread for the next week open.
  2. What is the OS and BS where you run the script? Did you measure the time manually? I have a similar problem, see
  3. Sorry, didn't get your example. Anyhow no change in behavior
  4. No, standalone Windows PC with XP.
  5. Thanks folks, just forgott the OS infos
  6. What is your problem? This is the complete script! Do you really want a picture of the messagebox with a number? i attached it. I told you the version and system data! What are you missing????
  7. The script is as mentioned in the begining of the thread, I just updated Autoit to the latest version 3.3.8.1, on Intel Core2 Duo, E8400 3GHz. Output within the MessageBox as mentioned before, varies between 200 and 500.
  8. No i dont speak about milliseconds, i need a delay of 0,5 to 2 seconds until the GUI is build up completely and i can not use WinWaitActive. By the way i am only curious about the wrong output of TimeDiff, since the time is whithin some milliseconds correct. Sleep (5000) => sleeping time measured about 5s, output TimeDiff => between 200 and 500!
  9. I just tried the direct dll method as described by monoceres $dll=DllOpen("kernel32.dll") $timer=TimerInit() DllCall($dll,"none","Sleep","dword",1000) MsgBox(0, "Timer2", "Laufzeit = "& TimerDiff($timer)) the result was nearly the same What is strange to me is that the sleeping time is accurate, only the output of the TimerDiff is not correct.
  10. There should be a screen print... but it seems not to work.... Whats the best way to insert a screenprint??? Paul
  11. One of the outputs .... Regards Paul
  12. Hi, while running a script, i sometimes need a short delay. I tried it with sleep, but received a strange behavior depending on the hardware. Just a simple script like $begin = TimerInit() Sleep(5000) MsgBox(0, "Timer", "Duration = "& TimerDiff($begin)) gives a duration of 5004 on a Pentium with 4CPU, 3GHz, on an Intel Core2 Duo, E8400 3GHz differs each time i run the script, but allways much lower, between 200 and 500! Even compiling the script on the second PC didn't change anything???? Funny thing, the real duration is correct, only the output differs Any ideas, do i miss anything??? Regards Paul
×
×
  • Create New...