Function Reference


_TimeToTicks

Converts the specified hours, minutes, and seconds to ticks

#include <Date.au3>
_TimeToTicks ( [$iHours = @HOUR [, $iMins = @MIN [, $iSecs = @SEC]]] )

Parameters

$iHours [optional] The hours.
$iMins [optional] The minutes.
$iSecs [optional] The seconds.

Return Value

Success: the number of ticks.
Failure: 0 and sets the @error flag to non-zero.
@error: 1 - The specified hours, minutes, or seconds are not valid.

Related

_TicksToTime

Example

#include <Date.au3>
#include <MsgBoxConstants.au3>

Local $iSec, $iMin, $iHour
; calculate with time
Local $iStartTicks = _TimeToTicks(@HOUR, @MIN, @SEC)
; calculate 45 minutes later
Local $iEndTicks = $iStartTicks + 45 * 60 * 1000
_TicksToTime($iEndTicks, $iHour, $iMin, $iSec)
MsgBox($MB_SYSTEMMODAL, '', 'New Time:' & $iHour & ":" & $iMin & ":" & $iSec)