Public Member Functions | List of all members
progressbar.ETA Class Reference
Inheritance diagram for progressbar.ETA:
progressbar.ProgressBarWidget

Public Member Functions

def format_time (self, seconds)
 
def update (self, pbar)
 
- Public Member Functions inherited from progressbar.ProgressBarWidget
def update (self, pbar)
 

Detailed Description

Definition at line 107 of file progressbar.py.

Member Function Documentation

def progressbar.ETA.format_time (   self,
  seconds 
)

Definition at line 109 of file progressbar.py.

109  def format_time(self, seconds):
110  return time.strftime('%H:%M:%S', time.gmtime(seconds))
def format_time(self, seconds)
Definition: progressbar.py:109
def progressbar.ETA.update (   self,
  pbar 
)

Definition at line 111 of file progressbar.py.

111  def update(self, pbar):
112  if pbar.currval == 0:
113  return 'ETA: --:--:--'
114  elif pbar.finished:
115  return 'Time: %s' % self.format_time(pbar.seconds_elapsed)
116  else:
117  elapsed = pbar.seconds_elapsed
118  eta = elapsed * pbar.maxval / pbar.currval - elapsed
119  return 'ETA: %s' % self.format_time(eta)
120 
def update(self, pbar)
Definition: progressbar.py:111
def format_time(self, seconds)
Definition: progressbar.py:109

The documentation for this class was generated from the following file: