Welcome to smalltime’s documentation!

class smalltime.timer.SmallTimer(name: Optional[str] = None)

A semi-accurate timer with start and stop capabilities.

Parameters

name – an optional label for identifying your timer.

start() smalltime.timer.SmallTimer

Starts the timer.

Returns

the started timer object.

stop() int

Stops the timer.

Returns

the number of nanoseconds between starting and stopping the timer

smalltime.timer.timed(name: Optional[str] = None) Callable

A convenience decorator for timing whole functions.

Parameters

name – an optional label for identifying your timer.

Indices and tables