timer

odl.util.testutils.timer(name=None)[source]

A timer context manager.

Usage:

with timer('name'):
    # Do stuff

Prints the time stuff took to execute.