61. timer — A timer class.

Classes defined in module timer

class timer.Timer

A class for measuring elapsed time.

reset()

Start the timer.

read()

Read the timer.

This returns the elapsed time since the last reset (or the creation of the timer) as a datetime.timedelta object.

seconds(rounded=True)

Return the timer readings in seconds.

The default return value is a rounded integer number of seconds. With rounded == False, a floating point value with granularity of 1 microsecond is returned.

Functions defined in module timer

Documentation

Previous topic

60. sendmail — sendmail.py: a simple program to send an email message

Next topic

pyFormex file formats