next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc > The Macaulay2 language > system facilities > elapsedTiming

elapsedTiming -- time a computation using time elapsed

Description

elapsedTiming e evaluates e and returns a list of type Time of the form {t,v}, where t is the number of seconds of time elapsed, and v is the value of the the expression.

The default method for printing such timing results is to display the timing separately in a comment below the computed value.

i1 : elapsedTiming sleep 1

o1 = 0
     -- 1.00097 seconds

o1 : Time
i2 : peek oo

o2 = Time{1.00097, 0}

See also

For the programmer

The object elapsedTiming is a keyword.