next up previous contents index
Next: gc Up: Utilities Previous: nil   Contents   Index


Timer


Usage

import from Timer


Description

Timer is a type whose elements are stopwatch timers, which can be used to time precisely various sections of code, including garbage collection. The precision can be up to 1 millisecond but depends on the operating system. The times returned are CPU times (user + gc) used by the process that created the timer.


Exports

gc: % $\to$ MachineInteger read a timer
read: % $\to$ MachineInteger read a timer
reset!: % $\to$ % reset a timer to 0
start!: % $\to$ MachineInteger start or restart a timer
stop!: % $\to$ MachineInteger stop a timer
timer: () $\to$ % create a new timer



Subsections

Manuel Bronstein 2004-06-28