Stopwatch

Allows starting and stopping any number of labeled timers at any point during the execution of a Mikado program. This enables measuring the duration of specific sequences or cyclical tasks. The task generally behaves like a standard stopwatch and offers the functions start / split / stop.

Input-Variables

Input/Output

Name

Type

Description

Input

Mode

Parameter

Select the stopwatch operating mode:

  • Start / Split: Initialises the selected timer or resets it, and records the elapsed time since the last call. This mode can be called as many times in succession as required to record the duration of cyclical intervals (split)

  • Stop: Stops the selected timer and records the elapsed time since it was last started. The timer must be started before it can be stopped.

Input

Label

String

The label of the timer, which can be used to uniquely identify it.

Output-Variables

Input/Output

Name

Type

Description

Output (optional)

Interval [s]

Double

Interval since the last call to Start / Split. When a timer is first started, 0.0 seconds is returned.

Output (optional)

Median [s]

Double

The median value of the recorded timer intervals. When a timer is first started, 0.0 seconds is returned. A maximum of 1000 intervals are recorded for each timer. Once this limit is reached, the oldest entry is removed whenever a new entry is added (sliding window method).