Filename: timing.py Authors: Pablo Winant Date: 10/16/14 Provides Matlab-like tic, tac and toc functions.

quantecon.util.timing.loop_timer(n, function, args=None, digits=2, print_output=True, output=True, best_of=3)[source]

Prints the total and average time elapsed for n runs of function.

quantecon.util.timing.tac(digits=2, print_output=True, output=True)[source]

Prints and returns elapsed time since last tic, tac or toc.


Saves time for future use with tac or toc.

quantecon.util.timing.toc(digits=2, print_output=True, output=True)[source]

Returns and prints time elapsed since last tic().