*! version 1.2.2 15may2018

Title

tic & toc -- Simplified timer commands

Syntax

Start the timer

tic [# , pause resume]

Measure the elapsed time

toc [#]

where # is an integer, 1 through 100.

Main
pause pauses the timer (number # if # provided)

resume resumes the timer (number # if # provided)

Description

tic & toc are simplified timer commands for measuring elapsed time.

tic activates the timer and toc displays the time elapsed since activation. This information is also stored as an r-class scalar. A tic can be followed by multiple tocs, and the timer can be paused and resumed as needed.

An integer # = 1..100 can be used to distinguish multiple timers running at once. # is set to 100 if no number is provided.

Examples

Basic use:

. tic

. sleep 1000

. toc

Pausing and resuming Timer 1 while Timer 2 is running:

. tic 1

. tic 2

. sleep 1000

. tic 1, pause

. sleep 1000

. tic 1, resume

. sleep 1000

. toc 1

. toc 2

Contact

Jan Kabátek, The University of Melbourne

j.kabatek@unimelb.edu.au