Method
Ticks
Warning
This item was deprecated in version 2019r2. Please use System.Ticks as a replacement.
Description
Returns the number of Ticks (60th of a second) that have passed since the user's computer was started.
Usage
result=Ticks
Part |
Type |
Description |
---|---|---|
result |
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.
Sample code
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.")
Compatibility
All project types on all supported operating systems.
See also
System.Microseconds function.