sleinininono Posted October 30, 2018 Share Posted October 30, 2018 I was thinking about writing in my program a loop with in it sleep( ( 60 * 30 ) * 1000 ) in order to make my program wait 30 minuts... and then do the loop again. But I read that the function check every 10 ms if the sleep is ended... is there a way to optimize what I want to do ? thank you Link to comment Share on other sites More sharing options...
Developers Jos Posted October 30, 2018 Developers Share Posted October 30, 2018 Optimize how? Does it use any CPU resource when the Sleep() is active? 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...
Davidowicza Posted October 30, 2018 Share Posted October 30, 2018 If you have a long sleep like that, you can just put your .exe in a Windows Task Scheduler for every 30 minutes have it run. Link to comment Share on other sites More sharing options...
sleinininono Posted October 30, 2018 Author Share Posted October 30, 2018 that's true but it is not effective... I find it hard to manage... I was doing it still yesterday. But I prefer to code something... I don't know Jos, maybe it is a lot of computation to do so... I just want to preserve my computer Link to comment Share on other sites More sharing options...
Developers Jos Posted October 30, 2018 Developers Share Posted October 30, 2018 11 minutes ago, sleinininono said: I don't know Jos, maybe it is a lot of computation to do so... I just want to preserve my computer So you basically are asking to optimise something you do not know whether it needs any optimization.... curious to say the least! FrancescoDiMuro 1 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...
Somerset Posted October 30, 2018 Share Posted October 30, 2018 23 minutes ago, Jos said: Optimize how? Does it use any CPU resource when the Sleep() is active? Jos It's obvious his cpu needs sleeping pills to get some proper rest. Link to comment Share on other sites More sharing options...
sleinininono Posted October 30, 2018 Author Share Posted October 30, 2018 very funny hahahah, but can you please answer me ^_^? It would be great to know if I do need to do anything? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 30, 2018 Developers Share Posted October 30, 2018 (edited) 4 minutes ago, sleinininono said: very funny hahahah, but can you please answer me ^_^? It would be great to know if I do need to do anything? Ok, for the last time: What is it that need to be optimised and you are having issues with or else please do not bother us with these phantom issues? Jos Edited October 30, 2018 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...
sleinininono Posted October 30, 2018 Author Share Posted October 30, 2018 but I don't know what to add. I wanted to know if there is a way to bypass the fact that it is checking whether the time is finished every 10 ms if I'm asking the program to wait 30 min ! Is it or not ? Is it even useful to wonder such questions? that's what I'm asking Link to comment Share on other sites More sharing options...
Developers Jos Posted October 30, 2018 Developers Share Posted October 30, 2018 Ok, so you do not have any problem, just the hearsay that this is happening but you have no clue what that means. sweet.. Here you go: The answer is No 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...
sleinininono Posted October 30, 2018 Author Share Posted October 30, 2018 thank you ! see ya Link to comment Share on other sites More sharing options...
caramen Posted October 31, 2018 Share Posted October 31, 2018 (edited) @sleinininono Why not just use AdlibRegister to execute your function every 30 minute. And sleep anytime ? You wont need any optimisation... the code will just be run with your wait configuration without a sleep. Edited October 31, 2018 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
Developers Jos Posted October 31, 2018 Developers Share Posted October 31, 2018 @caramen, Why are you making suggestions about something that isn't asked? Please let it rest as the OP clearly doesn't have any issue but was guessing. *click* before this get even more attention. 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...
Recommended Posts