Ticks Function

Returns the number of ticks (60th of a second) that have passed since the user's computer was started.

Syntax
result = Ticks( )

Return Value
Result | Integer | The number of ticks that have passed while the computer is operating.

# Notes

Because modern operating systems can stay running for so long, it's possible for the machine's internal counters to "roll over." This means that if you are using this function to determine how much time has elapsed between two events, you may encounter a case where it appears that the stop time is prior to the start time.

# Examples

This example displays in message box the number of minutes the computer has been on.

Dim minutes As Integer
minutes=Ticks/60/60
MsgBox "Your computer has been on for"+ Str(minutes)+" minutes."

# See Also

Microseconds function.