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.
The time at which the Timer instance was created.
Stops the clock permanently for the instance of the Timer. Returns the time at which the instance was stopped.
The time at which stop() was called, or None if stop was never called.
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.
>>> from stopwatch import clockit >>> @clockit def mult(a, b): return a * b >>> print mult(2, 6) mult in 1.38282775879e-05 sec