Timer#

Introduction#

The VEX 123’s Brain has a timer that keeps track of elapsed time from the start of a project. It can be used to measure how long something takes or reset for new timing operations.

Below is a list of all available blocks:

reset timer#

The reset timer stack block resets the timer to zero. This can be used to start timing a new part of a project without restarting the whole project.

The reset timer stack block.#
  reset timer :: custom-orientation

Parameters

Description

This block has no parameters.

Example

  when started :: hat events
  [Reset the timer when the sound button is pressed.]
  forever
  clear all rows
  print (timer in seconds) ▶
  if <[soundIcon v] pressed?> then
  reset timer :: custom-orientation

timer in seconds#

The timer in seconds reporter block reports the time since the timer was last reset, as a decimal in seconds. The timer is automatically reset at the start of a project. This block can be used to time how long it takes the robot to complete different actions.

The timer in seconds reporter block.#
  (timer in seconds)

Parameters

Description

This block has no parameters.

Example

  when started :: hat events
  [Reset the timer when the sound button is pressed.]
  forever
  clear all rows
  print (timer in seconds) ▶
  if <[soundIcon v] pressed?> then
  reset timer :: custom-orientation