Bases: object
Main stopwatch object, providing functionality to measure time.
DEPRECATED. This class (and the networkit.stopwatch module) will be removed in future updates.
The number of seconds since the current time that the Timer object was created. If stop() was called, it is the number of seconds from the instance creation until stop() was called.
Elapsed time.
float
The time at which the Timer instance was created.
Starting time.
float
Stops the clock permanently for the instance of the Timer. Returns the time at which the instance was stopped.
Stop time.
float
The time at which stop() was called, or None if stop was never called.
Stop time.
float or None
Function decorator that times the evaluation of func and prints the execution time.
DEPRECATED. This function (and the networkit.stopwatch module) will be removed in future updates.
Example
..code
>>> from stopwatch import clockit
>>> @clockit
def mult(a, b):
return a * b
>>> print mult(2, 6)
mult in 1.38282775879e-05 sec