biosppy.timing

biosppy.timing

This module provides simple methods to measure computation times.

copyright:
  1. 2015-2026 by Instituto de Telecomunicacoes

license:

BSD 3-clause, see LICENSE for more details.

Functions

clear([name])

Clear the clock.

clear_all()

Clear all clocks.

tac([name])

Stop the clock.

tic([name])

Start the clock.

biosppy.timing.clear(name=None)[source]

Clear the clock.

Parameters:

name (str, optional) – Name of the clock; if None, uses the default name.

biosppy.timing.clear_all()[source]

Clear all clocks.

biosppy.timing.tac(name=None)[source]

Stop the clock.

Parameters:

name (str, optional) – Name of the clock; if None, uses the default name.

Returns:

delta (float) – Elapsed time, in seconds.

Raises:

KeyError if the name of the clock is unknown.

biosppy.timing.tic(name=None)[source]

Start the clock.

Parameters:

name (str, optional) – Name of the clock; if None, uses the default name.