Jump to content

Search the Community

Showing results for tags 'TimerInit'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 4 results

  1. does anyone know what exactly TimerDiff() is doing with the integer returned by TimerInit() in order to get milliseconds? Just trying to find out if i can use the integer timerinit() returns in a slightly different way to the norm because it will save me a great deal of effort. ( hoping to save the integer in a db and query rows where the difference in current time integer is > x where x = whatever the integer needs to be to = y hours )
  2. Hi everyone. I have a question and wasn't able to find any answer for this. What is the maximum value/limit for TimerInit & TimerDiff. I mean, If I use TimerInit() in my script, how long can it 'last'? How long will I be able to read it with TimerDiff()? I realize that the result of TimerDiff isn't an Integer. It's a floating number and I am not sure what the maximum value is. I would like my program to use $Time = TimerInit() today, and then I'll be able to use TimerDiff($Time) tomorrow or even the day after. Is this possible? and what happens if TimerDiff exceeds the maximum value (if there is any)?
  3. So I have some timers which I reset periodically, but my problem is that they don't wait for the functions before them to finish and in a strange way reset beforehand. -snip- timerinit doesnt wait the mouseclick and sleep functions to finish
  4. I am trying to write a script that keeps accurate time regardless of how long functions take to preform their actions. I thought this would be pretty straight forward. I use several while loops to keep track of days, hours, mins, and secs. But for some reason it is not working correctly. Global $day, $hour, $min, $sec $time = TimerInit() While 1 ;Main Loop $hour = 0 ;Reset hours While $hour <= 23;Loop while hours is less than 24 hours $min = 0 ;Reset minutes While $min <= 59 ;Loop while minutes is less than 60 minutes $sec = 0 ;Reset seconds While $sec <= 59 ;Loop while seconds is less than 60 seconds $show_sec = $sec $dif = TimerDiff($time) ;checks how many milliseconds has passed since timer start $sec = int($dif/1000) ;counts the seconds sleep(50) ;cpu sleep if $sec <> $Show_Sec then ConsoleWrite($sec&@crlf) WEnd ;End Sec Loop $time = $time + 60 * 1000 ; add one minute to initial time to keep accuracy $min = $min + 1 ;Add 1 minute Consolewrite("!Min: "&$min&@crlf) WEnd ;End Min Loop $hour = $hour + 1 ;Add 1 hour WEnd ;End Hour loop $day = $day + 1 ; Add 1 day WEnd [autoit] For the first minute it goes according to plan but after that For some reason it does not reset the sec to 0 after the first minute. I am sure that this is tied to the $time = $time + 60 *1000 I don't believe that I am adding 60 seconds to the ticks from the init time but this is what the autoit examples show on how to add ticks. Any ideas?
×
×
  • Create New...