ProtoFlux:Stopwatch

From Resonite Wiki
Revision as of 19:39, 4 July 2024 by Yosh (talk | contribs) (Yosh moved page ProtoFlux:Stop Watch to ProtoFlux:Stopwatch: Stopwatch is one word and not camelcased inside frooxengine. it shouldn't be treated as two separate words here)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Stopwatch
Start
OnStart
Stop
OnStop
Reset
OnReset
Time
IsRunning
Actions

The Stopwatch node keeps track of time when running. Akin to a real stopwatch, it allows one to start time, stop time, and reset time.

Inputs

Start (Call)

Starts the stopwatch, putting it in the running state.

Stop (Call)

Stops the stopwatch, putting it in the stopped state.

Reset (Call)

Resets the stopwatch time. Does not affect the state of the stopwatch.

Outputs

OnStarted (Continuation)

Sends an impulse when Start is impulsed. Is not affected by the state of the stopwatch.

OnStopped (Continuation)

Sends an impulse when Stop is impulsed. Is not affected by the state of the stopwatch.

OnReset (Continuation)

Sends an impulse when Reset is impulsed. Is not affected by the state of the stopwatch.

Time (Float)

The time in seconds stored by the stopwatch. This value increments when in the running state and freezes when in the stopped state. If Reset is pulsed, this output is set to 0, but continues the same behavior of the state the watch is in.

Sometimes, it may be desirable to obtain a TimeSpan type from this value. To do so, use a TimeSpan From Seconds node.

IsRunning (Bool)

True if the stopwatch is in a running state, False otherwise.

Examples