Snook Posted January 6, 2007 Share Posted January 6, 2007 Ok using the Sleep Function and by using this code$begin = TimerInit() sleep(3000) $dif = TimerDiff($begin) MsgBox(0,"Time Difference",$dif) oÝ÷ ÚØ^¶)ÉèµìZrׯz¼g¢²Ø^ë(ìÈjj+zÞr+¶)¢áȬÂ"¯zz0Y«#ºËp¢w^®'íêÞË(ëaxq©Ý¢ØZ¶Éè¶Ú¢je{¬+®*mx,)e±ªÞ)¢µçZºÚ"µÍÌÍØÚXÚÜÝ[HH^[ÚXÚÜÝ[J ÍË Í ÎK ÍBÚ[H ÌÍØÚXÚÜÝ[HH^[ÚXÚÜÝ[J ÍË Í ÎK ÍBTÛY L BÑ[[ÝÙS[ÝJLK L BÌÍØYÚ[H[Y[] BÛY JBÌÍÙYH[YY ÌÍØYÚ[B^U ][ÝÕ[YI][ÝË ÌÍÙY JBÙ[ ][ÝÐI][ÝÊ Link to comment Share on other sites More sharing options...
xcal Posted January 6, 2007 Share Posted January 6, 2007 I'm only getting a variation of about 0 to .007 of a second. Exactly how accurately do you need it to be?? How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Snook Posted January 6, 2007 Author Share Posted January 6, 2007 I worte down a few times it showed from my script 109.----- 81.------ 86.----- 128.---- 76.---- I was just thinking it was affecting it for what I'm trying to do. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 6, 2007 Moderators Share Posted January 6, 2007 Stands to reason the time would not be exact every time. It takes time to move through the interpreter and depends on how fast/memory/and processes are using your system resources are at the moment you are running things. You also need to divide your returns by 1000 to get the proper value: Time = 0.00232739077173205 Time = 0.023152942622596 Time = 0.0118596078551882 Time = 0.00925424879419046 Time = 0.00302775911463593 Time = 0.0273518002986415 Time = 0.003409930591737 Time = 0.0111634299890069 Time = 0.0159710242502888 Time = 0.0063630992207111 Average Difference = 0.01138812335087281/100th of a second difference... not too shabby. You can run the test for yourself:ConsoleWrite(@LF) Global $iCount = 0, $iAdd = 0, $nHold = '' While $iCount < 10 $begin = TimerInit() Sleep(3000) $dif = TimerDiff($begin) ConsoleWrite('Time = ' & (($dif / 1000) - 3) & @CRLF) $nHold &= (($dif / 1000) - 3) & Chr(1); Create a string that can be made into an array/Subtract the 3 seconds for sleep $iCount += 1 WEnd $nHold = StringSplit(StringTrimRight($nHold, 1), Chr(1)) For $iCC = 1 To UBound($nHold) - 1 $iAdd += ($nHold[$iCC] / (UBound($nHold) - 1)) Next ConsoleWrite('Average Difference = ' & $iAdd & @LF) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shevilie Posted January 6, 2007 Share Posted January 6, 2007 My guess would be your PixelChecksum(637, 474, 639, 476) thats taking the time, though its a small area.... (Only a guess) Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit Link to comment Share on other sites More sharing options...
BALA Posted January 6, 2007 Share Posted January 6, 2007 (edited) Really, I don't think AutoIt is fast enough to get/use the times correctly in sync Sort of why I gave up trying to program an All-Purpose Autoer in AutoIt. Now C, that's a different story Edited January 6, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 6, 2007 Moderators Share Posted January 6, 2007 Really, I don't think AutoIt is fast enough to get/use the times correctly in syncSort of why I gave up trying to program an All-Purpose Autoer in AutoIt.Now C, that's a different story That's apparent. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now