KaFu Posted February 28, 2009 Share Posted February 28, 2009 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 There is no Sleep(1). All values between 1-9 will be 10 so it will be 3*1000*60*10 and that equals 30 minutes!!You have a point. Sorry I forgot that Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
jvanegmond Posted February 28, 2009 Share Posted February 28, 2009 What the fuck. Since when is that? /request replacement for sleep. github.com/jvanegmond Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 What the fuck. Since when is that?/request replacement for sleep.It's been there for a while. And if I remember correctly it can't be fixed? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 28, 2009 Share Posted February 28, 2009 (edited) It's been there for a while. And if I remember correctly it can't be fixed?According to monoceres every call we do to Sleep() generates multiple internal calls, so it should be possible, right?Edit: Here is the post I am referring to Edited February 28, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 According to monoceres every call we do to Sleep() generates multiple internal calls, so it should be possible, right?Edit: Here is the post I am referring toWell either way, the time it takes for the interrupt to start and end would add time anyway. Although you won't really notice 1 or 10 milliseconds. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Authenticity Posted February 28, 2009 Share Posted February 28, 2009 It's actually 15 like the minimum interval that a WM_TIMER can be posted, not sure though. Link to comment Share on other sites More sharing options...
monoceres Posted February 28, 2009 Share Posted February 28, 2009 What the fuck. Since when is that?/request replacement for sleep.Since always.A better alternative would be to call the native sleep api directly.Script that does that. Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
Developers Jos Posted February 28, 2009 Developers Share Posted February 28, 2009 funny to see a "simple"question turn into a "techies discussion".. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 funny to see a "simple"question turn into a "techies discussion"..Did Jos just imply I am a "techie" Either way and no matter whatever we do, it will always end up out of sync. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Developers Jos Posted February 28, 2009 Developers Share Posted February 28, 2009 (edited) Did Jos just imply I am a "techie" Either way and no matter whatever we do, it will always end up out of sync.yep... but between double quotes .....Seriously: Don't think there is any forced minimum time in AutoIt3, just the time it takes to process the Sleep(xyz) scriptline.Jos Edited February 28, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Authenticity Posted February 28, 2009 Share Posted February 28, 2009 Dim $iInit, $TimeDiff[100] For $i = 0 To 99 $iInit = TimerInit() For $j = 0 To 273 Sleep(0) Next $TimeDiff[$i] = TimerDiff($iInit) Next Dim $Avg = 0 For $i = 0 To 99 ConsoleWrite('Timer Diff: ' & $TimeDiff[$i] & @LF) $Avg += $TimeDiff[$i] Next ConsoleWrite('Average: ' & $Avg/100 & @LF) Not accurate but probably statistical results has to do something with it. ~the TimeDiff and TimeInit intervals but it's also machine depended and the minimum amount of time the resolution allows. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted February 28, 2009 Share Posted February 28, 2009 (edited) Since always.A better alternative would be to call the native sleep api directly.Script that does that.Yeah you really hit the jackpot with that one, without _HighPrecisionSleep() I would never have been able to get acceptable speeds with Platformerious (a so far unrealeased platform-game)yep... but between double quotes .....Seriously: Don't think there is any forced minimum time in AutoIt3, just the time it takes to process the Sleep(xyz) scriptline.JosWell I learned it from this forum, it was one of the devs or mods that said it, I will try to find it. Besides shouldn't then Sleep(0) also be around 10ms? Edited February 28, 2009 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
Authenticity Posted February 28, 2009 Share Posted February 28, 2009 Nope, Sleep(0) is causing the thread to relinquish it's time slice but it's depended on other system factors so it can't be truly accurate even if it might seem so. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 28, 2009 Developers Share Posted February 28, 2009 (edited) Yeah you really hit the jackpot with that one, without _HighPrecisionSleep() I would never have been able to get acceptable speeds with Platformerious (a so far unrealeased platform-game)Well I learned it from this forum, it was one of the devs or mods that said it, I will try to find it. Besides shouldn't then Sleep(0) also be around 10ms?Ok, let me check the details.I know there is an implicit sleep(10) for GuiGetMsg(), but have to check to code to see if Sleep has a minimum of 10.EDIT: Sleep(0) is treated differently.Jos Edited February 28, 2009 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 Ok, let me check the details.I know there is an implicit sleep(10) for GuiGetMsg(), but have to check to code to see if Sleep has a minimum of 10.EDIT: Sleep(0) is treated differently.JosTreated differently how? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
monoceres Posted February 28, 2009 Share Posted February 28, 2009 Treated differently how?#341362 Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
M a k a v e l ! Posted February 28, 2009 Share Posted February 28, 2009 One of the funniest topics in a while. ^^Indeed. [font="Lucida Sans Unicode"]M a k. a v e L ![/font] Link to comment Share on other sites More sharing options...
Developers Jos Posted February 28, 2009 Developers Share Posted February 28, 2009 #341362Yep, that pretty much explains it. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
James Posted February 28, 2009 Share Posted February 28, 2009 Got it. Well I didn't realise how cool Sleep(0) was Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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