Skip to content

Clock

The Clock behavior is present on the Digital Clock object.

Clock Modes

  • Current Time: Displays the current time of the host.
  • Stopwatch: Displays a running count up.
  • Timer: Displays a countdown and beeps once complete.

Member Variables

Variable Type Description
paused If the clock timer is paused.

Function Summary

Function Name Return Description  
getValue()
getValue()
Current time in stopwatch or timer mode. Clock mode returns 0. This function acts the same as Object's getValue().
pauseStart()
pauseStart()
Pauses/resumes a Clock in stopwatch or timer mode.
setValue( seconds) Switches clock to timer and sets countdown time. This function acts the same as Object's setValue().
showCurrentTime()
showCurrentTime()
Switches clock to display current time. It will clear any stopwatch or timer.
startStopwatch()
startStopwatch()
Switches clock to stopwatch, setting time to 0. It will reset time if already in stopwatch mode.

Function Details

setValue(...)

Set the timer to display a number of seconds. This function acts the same as Object's setValue(). If the Clock is not in timer mode, it will be switched. If it is in timer mode, it will be paused and the remaining time will be changed. This will not start the countdown on its own.

setValue(seconds)

  • seconds: How many seconds will be counted down.
self.Clock.setValue(30)