Timer Block

The Timer block gets timing data from the internal timer in the EV3 Brick. You can measure a time interval in seconds and get a Numeric output. You can also compare a time to a Threshold Value to get a Logic (True or False) output.

See Using the Timer for more information about how the Timer works, the data that it provides, and programming examples.
Tips and Tricks
The Timer block outputs data with a Data Wire. See Using the Timer for other ways to use the Timer that do not require a data wire.
Choose the Timer Number and Mode


Mode Selector
Inputs
Outputs

Use the Mode Selector to select the mode for the block. The Inputs and Outputs available will change depending on the mode. The modes are described below.

Use the Timer input to choose a timer number. The EV3 Brick has eight timers, so you can time up to eight different things together.
Modes
Measure


The Measure mode outputs a timer value in the Elapsed Time. Time is measured in seconds, starting at the last time the timer was reset using the Reset mode (or from the beginning of the program if the timer has never been reset.
Compare


The Compare mode compares a timer value to the Threshold Value (in seconds) using the selected Compare Type. The True/False result is output in Compare Result, and the timer value is output in Elapsed Time.
Reset


The Reset mode resets the timer specified by the Timer input to zero. The timer starts timing again immediately from zero.

See Using the Timer for programming examples.
Inputs and Outputs
The inputs available for the Timer block will depend on the mode selected. You can enter the input values directly into the block. Alternatively, the input values can be supplied by Data Wires from the outputs of other Programming Blocks.
InputTypeAllowed ValuesNotes
Timer Numeric1 - 8Which timer to use
Compare Type Numeric0 - 50: = (Equal to)
1: ≠ (Not Equal to)
2: > (Greater than)
3: ≥ (Greater than or Equal to)
4: < (Less than)
5: ≤ (Less than or Equal to)
Threshold Value NumericAny numberValue to compare to, in seconds
The outputs available will depend on the mode selected. To use an output, use a Data Wire to connect it to another Programming Block.
OutputTypeNotes
Elapsed Time NumericTime in seconds
Compare Result LogicTrue/False result of a Compare mode.
Timer
Quick links