pyjob.stopwatch module

Module to store a stopwatch class

class pyjob.stopwatch.Interval(index)[source]

Bases: pyjob.stopwatch.Time

Interval time

average

The average lap time in ms

lap

Take a lap snapshot

laps

The laps

nlaps

Number of laps

start()[source]

Start the interval

stop()[source]

Stop the interval

time

Total runtime

class pyjob.stopwatch.Lap(index)[source]

Bases: pyjob.stopwatch.Time

Lap time

class pyjob.stopwatch.StopWatch[source]

Bases: pyjob.stopwatch.Time

Stopwatch class

intervals

The intervals taken

lap

Take a lap snapshot

nintervals

Number of intervals

reset()[source]

Reset the timer

running

Stopwatch status

start()[source]

Start the interval

stop()[source]

Stop the interval

time

Time in seconds

class pyjob.stopwatch.Time(index)[source]

Bases: object

Generic time class

time

Time

time_pretty

Convert (seconds) to (days, hours, minutes, seconds)