The Stopwatch
node keeps track of time when running. To start the Stopwatch, send in a pulse to the Start Call. To stop the Stopwatch, send a pulse to the Stop Call. To reset the current value in this Stopwatch, send a pulse to the Reset Call. You can send a reset call when the Stopwatch is running, this will keep it running and the value will just be reset. Sending multiple pulses to the same call will not change it's previous state (Start does nothing if already started, stop does nothing when already stopped, reset does nothing when the value is 0).
Inputs
Start (Call)
Calls to Start the Stopwatch, setting the IsRunning
state to true. Does nothing if the Stopwatch is already in a running state.
Stop (Call)
Calls to Stop the Stopwatch, setting the IsRunning
state to false. Does nothing if the Stopwatch is already in the stopped state.
Reset (Call)
Calls to Reset the Stopwatch, sets the Time output to zero (0).
Outputs
OnStarted (Continuation)
Sends an impulse after a Start Call has been impulsed.
OnStopped (Continuation)
Sends an impulse after a Stop Call has been impulsed.
OnReset (Continuation)
Sends an impulse after a Reset Call has been impulsed.
Time (Float)
Returns the amount of time since the stopwatch has been started, as a Float representing seconds before the decimal place and fractions of a second after the decimal place. If a TimeSpan is desired instead of a Float, use the TimeSpanFromSeconds node to convert for the appropriate resolution.
IsRunning (Bool)
Is true if the Stopwatch is in a Running state and false if the Stopwatch is in a Stopped state.