I'm new to programming and I'm not sure why the function I created produces two different result every time, going back and forth. Here's the example code:
Code: Select all
aTime := A_Tickcount
Sleep, 1000
loop
{
aTime := compareTime(aTime)
MsgBox, %aTime%, %A_TickCount%
}
compareTime(givenTickCount)
{
result := A_TickCount - givenTickCount
return, result
}
Thanks in advance.