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
Return Values
Returns accumulated operating time of the controller (real number, in hours).
See Also
Hour
Time Function Example
Function main
Real t_h, t_m, t_s
t_h = Time(0) 'Store the time in hours
t_m = Time(1) 'Store the time in minutes
t_s = Time(2) 'Store the time in seconds
Print "This controller has been used:"
Print t_h, "hours, ",
Print t_m, "minutes, ",
Print t_s, "seconds"
Fend