You are viewing an older version (9.5.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.5.0 / IPython / core / magics / execution / Timer / timeit

function

IPython.core.magics.execution:Timer.timeit

source: /IPython/core/magics/execution.py :170

Signature

def   timeit ( self number = 1000000 )

Summary

Time 'number' executions of the main statement.

Extended Summary

To be precise, this executes the setup statement once, and then returns the time it takes to execute the main statement a number of times, as a float measured in seconds. The argument is the number of times through the loop, defaulting to one million. The main statement, the setup statement and the timer function to be used are passed to the constructor.

Aliases

  • IPython.core.magics.execution.Timer.timeit