Turtle, Observer, Patch

timer

Description:
Reports the current value of the timer in seconds (since the last call to reset-timer).

Each thread of execution has its own timer. A thread of execution is started for each turtle when a turtle button is pressed, or code is entered in the turtle command center. A thread of execution is started for the observer if an observer button is pressed, or code is entered in the observer command center. When turtles, patches or observer are asked to do something (e.g. using ask-turtles, ask-patches or ask-observer), a new timer is created and used for that list-to-run.

Examples:
If you want to time how long it takes for a turtle to move 1000 steps, do this: reset-timer fd 1000 show timer.

Related Commands:
reset-timer