### The Maxima on-line user's manual

Algebra Calculator

#### Timer

Function: timer (<f_1>, ..., <f_n>)

Function: timer (all)

Function: timer () Given functions <f_1>, ..., <f_n>, `timer` puts each one on the list of functions for which timing statistics are collected. `timer(f)\$ timer(g)\$` puts `f` and then `g` onto the list; the list accumulates from one call to the next.

`timer(all)` puts all user-defined functions (as named by the global variable `functions`) on the list of timed functions.

With no arguments, `timer` returns the list of timed functions.

Maxima records how much time is spent executing each function on the list of timed functions. `timer_info` returns the timing statistics, including the average time elapsed per function call, the number of calls, and the total time elapsed. `untimer` removes functions from the list of timed functions.

`timer` quotes its arguments. `f(x) := x^2\$ g:f\$ timer(g)\$` does not put `f` on the timer list.

If `trace(f)` is in effect, then `timer(f)` has no effect; `trace` and `timer` cannot both be in effect at the same time.

See also `timer_devalue`.

There are also some inexact matches for `timer`. Try `?? timer` to see them.

```(%o1)                                true
(%i2) ```

timer();

Calculate

? timer;

Calculate

timer();

Calculate

? timer;

Calculate