Microseconds Function

Returns the number of microseconds (1,000,000th of a second) that have passed since the user's computer was started.

Syntax
result = Microseconds( )

Return Value
Result | Double | The number of microseconds that have passed since the user's computer was started. On Windows only, the result is accurate only to milliseconds.

# Note

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, you may encounter a case where this time is inaccurate.

# Examples

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

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