ETA¶
-
class
tfsnippet.utils.ETA(take_initial_snapshot=True)¶ Bases:
objectClass to help compute the Estimated Time Ahead (ETA).
Methods Summary
get_eta(progress[, now, take_snapshot])Get the Estimated Time Ahead (ETA). take_snapshot(progress[, now])Take a snapshot of (progress, now), for later computing ETA.Methods Documentation
-
get_eta(progress, now=None, take_snapshot=True)¶ Get the Estimated Time Ahead (ETA).
Parameters: Returns: - The remaining seconds, or
Noneif the ETA cannot be estimated.
Return type: - The remaining seconds, or
-
take_snapshot(progress, now=None)¶ Take a snapshot of
(progress, now), for later computing ETA.Parameters: - progress – The current progress, range in
[0, 1]. - now – The current timestamp in seconds. If not specified, use
time.time().
- progress – The current progress, range in
-