crumpets.timing module

class crumpets.timing.ETATimer(goal)[source]

Bases: crumpets.timing.RemainingTimer

Simple modification of the RemainingTimer. When called, instead of returning remainin time, return ETA (estimated time of arrival).

class crumpets.timing.RemainingTimer(goal)[source]

Bases: object

Estimates remaining time of some operation. Each time it is called, an internal counter is increased by 1. The measured operation is assumed to be done once this counter reaches goal. Out of the frequency of the calls one can compute an estimated speed and thus remaining time.

Parameters

goal – the number of calls until the operation is assumed to be done.

crumpets.timing.nicetime(seconds)[source]

formats given time in form of seconds to a nice string representation.

Returns

string representation of time