Jump to content
Sign in to follow this  
exodius

_TimeToTicks question

Recommended Posts

In the help file, the _TimeToTicks function has this example listed below it:

#include <Date.au3>
Global $Sec, $Min, $Hour, $Time
; calculate with time
$StartTicks = _TimeToTicks(@HOUR,@MIN,@SEC)
; calculate 45 minutes later
$EndTicks = $StartTicks + 45 * 60 * 1000
_TicksToTime($EndTicks,$Hour,$Min,$Sec)
MsgBox(262144,'' , 'New Time:' &  $Hour & ":" & $Min & ":" & $Sec)

How long is a tick? And would someone be nice enough to explain to me the "45 * 60 * 1000" part?

Edited by exodius

Share this post


Link to post
Share on other sites

45 Minutes is 45 * 60 Seconds

1 Second is 1000 Ticks

<{POST_SNAPBACK}>

Awesome. I suspected as much, and I appreciate the fast confirmation.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...