CMS 3D CMS Logo

Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes

progressbar::Timer Class Reference

Inheritance diagram for progressbar::Timer:
progressbar::Widget progressbar::FormatLabel

List of all members.

Public Member Functions

def __init__
def format_time
def update

Public Attributes

 format

Static Public Attributes

 TIME_SENSITIVE = True

Static Private Attributes

tuple __slots__ = ('format',)

Detailed Description

Definition at line 37 of file progressbar.py.


Constructor & Destructor Documentation

def progressbar::Timer::__init__ (   self,
  format = 'Elapsed Time: %s' 
)

Reimplemented in progressbar::FormatLabel.

Definition at line 43 of file progressbar.py.

00043                                            : %s'):
00044         self.format = format
00045 

Member Function Documentation

def progressbar::Timer::format_time (   seconds)

Definition at line 47 of file progressbar.py.

00048                             :
00049         'Formats time as the string "HH:MM:SS".'
00050 
00051         return str(datetime.timedelta(seconds=int(seconds)))
00052 

def progressbar::Timer::update (   self,
  pbar 
)
Updates the widget.

pbar - a reference to the calling ProgressBar

Reimplemented from progressbar::Widget.

Reimplemented in progressbar::FormatLabel.

Definition at line 53 of file progressbar.py.

00054                           :
00055         'Updates the widget to show the elapsed time.'
00056 
        return self.format % self.format_time(pbar.seconds_elapsed)

Member Data Documentation

tuple progressbar::Timer::__slots__ = ('format',) [static, private]

Reimplemented from progressbar::Widget.

Reimplemented in progressbar::FormatLabel.

Definition at line 40 of file progressbar.py.

Reimplemented in progressbar::FormatLabel.

Definition at line 43 of file progressbar.py.

Reimplemented from progressbar::Widget.

Definition at line 41 of file progressbar.py.