Time Function

Returns the controller accumulated operating time.

Syntax
Time(unitSelect)

Parameters

unitSelect
An integer number ranging from 0 to 2. This integer specifies which unit of time the controller returns:

  • 0: hours
  • 1: minutes
  • 2: seconds

Description
Returns the controller accumulated operating time as an integer.

See Also
Hour

Time Function Example
Shown below are a few examples from the command window:

Function main
    Integer h, m, s

    h = Time(0)   'Store the time in hours
    m = Time(1)   'Store the time in minutes
    s = Time(2)   'Store the time in seconds
    Print "This controller has been used:"
    Print h, "hours, ",
    Print m, "minutes, ",
    Print s, "seconds"
Fend