BigDaddyO Posted June 10, 2004 Share Posted June 10, 2004 Alright, I am trying to use the timer start and my brain hurts... Could anyone tell me how many milliseconds in an hour. Thanks, Mike Link to comment Share on other sites More sharing options...
HelloIDistance Posted June 10, 2004 Share Posted June 10, 2004 3600000 Link to comment Share on other sites More sharing options...
CyberSlug Posted June 10, 2004 Share Posted June 10, 2004 (edited) This might help in the future: 60 minutes 60 seconds 1000 millisecs 1 hour x ---------- x ---------- x -------------- = 3600000 millisecs hour minute second Edit: Missed a zero Edited June 10, 2004 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
BigDaddyO Posted June 10, 2004 Author Share Posted June 10, 2004 (edited) 3600000Thats what I thought. Apparently I must not understand the TimerStart than. I want a 'do until' to loop until the timer hits an hour "3,600,000" but it wouldn't work. So I put a msgbox in the loop to display the Timer info every 1 second. the message box is listing an item that is about 44 billion, What am I not understanding here? what shold I list the until $Timer = "HOUR" do $Time = TimerStart() sleep(1000) msgbox(0, "Timer", "It's been " & $Time) until $Time = 3600000 Mike Edited June 10, 2004 by MikeOsdx Link to comment Share on other sites More sharing options...
SlimShady Posted June 10, 2004 Share Posted June 10, 2004 You can make a script sleep for an hour this way: Sleep(60 * 60 * 1000) Link to comment Share on other sites More sharing options...
CyberSlug Posted June 10, 2004 Share Posted June 10, 2004 Look closely at the docs for TimerStop--it's somewhat strange. $start = TimerStart() Do sleep(100) Until TimerStop($start) > 3600000 Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
BigDaddyO Posted June 10, 2004 Author Share Posted June 10, 2004 Look closely at the docs for TimerStop--it's somewhat strange. $start = TimerStart() Do sleep(100) Until TimerStop($start) > 3600000That works, it is weird having to put the TimerStop in there but I guess I will just have to blindly accept that. thanks, Mike Link to comment Share on other sites More sharing options...
Administrators Jon Posted June 10, 2004 Administrators Share Posted June 10, 2004 I should have called it TimerDiff() or something. Never mind. Deployment Blog:Â https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming:Â https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
pekster Posted June 10, 2004 Share Posted June 10, 2004 That works,it is weird having to put the TimerStop in there but I guess I will just have to blindly accept that.If it helps you understand at all, when you call TimerStart it does not start at 0. Because of this, you need to call call TimerStop and referance the number you got back from TimerStart. This will then return the difference in time between the start time, and the current system time. [font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes. Link to comment Share on other sites More sharing options...
BigDaddyO Posted June 10, 2004 Author Share Posted June 10, 2004 If it helps you understand at all, when you call TimerStart it does not start at 0. Because of this, you need to call call TimerStop and referance the number you got back from TimerStart. This will then return the difference in time between the start time, and the current system time. Ahh, That makes perfect sence now. Thanks... That explaines the crazy numbers I was getting when I was sending the timer output to a mesagebox.Mike Link to comment Share on other sites More sharing options...
Guest Guest_Lor20 Posted June 12, 2004 Share Posted June 12, 2004 I did some testing - the timerstart function moves on for every cpu "cycle" (no idea what the correct terminus is here - so soince i got a 3 GHz Cpu that increases by 3,000,000,000 every second. The number is actually the number of cycles your CPU has gone through since you switched it on the last time. - so if you divide it by ur cppu frequency you get your uptime in seconds. Lor20 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