A time-tracker that counts down
Param: |
---|
Param: |
|
---|
Methods
__init__([repetitions, end_time, total_time]) |
|
||
append(item) | Appends the item to the times array | ||
close() | Resets the attributes (makes __call__ always evaluate to false, not once like default) | ||
log_error(error[, message]) | Logs the error in bold red | ||
log_estimated_time_remaining() | Log an estitmated remaining time based on the median and repetitions x xx | ||
log_update(elapsed) | Outputs to the log the most recent elapsed time information | ||
percentile(percentile) | calculates the percentile (e.g. 50 gets the median (the 50% item)) | ||
time_remains() | Evaluates if there is still time (or repetitions) remaining |
Attributes
log | The logger method indicated by the log_level | ||
logger |
|
||
times | collection of elapsed times |
Appends the item to the times array
Param: |
|
---|---|
Postcondition: | self.times contains item |
Resets the attributes (makes __call__ always evaluate to false, not once like default)
Postcondition: |
|
---|
Logs the error in bold red
Param: |
|
---|
Log an estitmated remaining time based on the median and repetitions x xx
Outputs to the log the most recent elapsed time information
Param: |
|
---|
calculates the percentile (e.g. 50 gets the median (the 50% item))
Returns: | value for percintile of self.times as a timedelta |
---|
Evaluates if there is still time (or repetitions) remaining
Precondition: | if total_time is set, self.start is set |
---|---|
Returns: | True if reps or time remains, False otherwise |
The logger method indicated by the log_level
Returns: | logger.debug or logger.info |
---|
Returns: | A logging object. |
---|
collection of elapsed times