<< Prev        Next >>

ID : 388

Timer

Function

To return the elapsed time.

Syntax

Timer

Return value

Return the elapsed time (in ms) after controller power On by integer type data.

Description

The elapsed time after the controller power On is returned. The unit is ms (millisecond).

Related Terms

Time

 

Attention

When the elapsed time exceeds the maximum value (+2147483647) of the integer type, addition is performed from the minimum value (-2147483648). It is after about 24.8 days later when the maximum value is exceeded.

Example

'!TITLE "Acquisition of Elapsed Time"
' Display the elapsed time calculation result
Sub Sample_Timer

  Dim aaa As Integer
  Dim bbb As Integer

  ' Assign the elapsed time to aaa
  aaa = Timer

  ' Display the elapsed time on the message output window
  PrintDbg aaa

  ' Assign a value obtained by adding 5 seconds to the elapsed time to bbb
  bbb = Timer + 5000 

  ' Display the elapsed time after addition on the message output window
  PrintDbg bbb

End Sub

ID : 388

<< Prev        Next >>