imate.Timer.tic#

Timer.tic()#

Initializes tracking time.

Note

This function should be called before calling imate.Timer.toc().

Examples

>>> # Load Timer class
>>> from imate import Timer

>>> # Instantiate a timer object
>>> timer = Timer()

>>> # Start tracking time
>>> timer.tic()

>>> # do something time-consuming
>>> from imate import toeplitz, logdet
>>> A = toeplitz(2, 1, size=1000000, gram=True)
>>> ld, info = logdet(A, method='slq', return_info=True)

>>> # Register a time-stamp right here in the code
>>> timer.toc()

>>> # Read wall time
>>> timer.wall_time
2.727652072906494

>>> # Read process time
>>> timer.proc_time
17.752098541000002