CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes
progressbar.Timer Class Reference
Inheritance diagram for progressbar.Timer:
progressbar.Widget progressbar.FormatLabel

Public Member Functions

def __init__
 
def update
 
- Public Member Functions inherited from progressbar.Widget
def update
 

Static Public Member Functions

def format_time
 

Public Attributes

 format
 

Static Public Attributes

 TIME_SENSITIVE = True
 
- Static Public Attributes inherited from progressbar.Widget
 TIME_SENSITIVE = False
 

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' 
)

Definition at line 43 of file progressbar.py.

43 
44  def __init__(self, format='Elapsed Time: %s'):
45  self.format = format

Member Function Documentation

def progressbar.Timer.format_time (   seconds)
static

Definition at line 47 of file progressbar.py.

References str.

Referenced by progressbar.Timer.update().

47 
48  def format_time(seconds):
49  'Formats time as the string "HH:MM:SS".'
50 
51  return str(datetime.timedelta(seconds=int(seconds)))
52 
#define str(s)
def progressbar.Timer.update (   self,
  pbar 
)

Definition at line 53 of file progressbar.py.

References Formatter.SimpleAsciiFormatter.format, progressbar.Timer.format, Formatter.SimpleHTMLFormatter.format, and progressbar.Timer.format_time().

Referenced by progressbar.ProgressBar.__next__(), MatrixUtil.Matrix.__setitem__(), MatrixUtil.Steps.__setitem__(), progressbar.ProgressBar.finish(), and MatrixUtil.Steps.overwrite().

53 
54  def update(self, pbar):
55  'Updates the widget to show the elapsed time.'
56 
return self.format % self.format_time(pbar.seconds_elapsed)

Member Data Documentation

tuple progressbar.Timer.__slots__ = ('format',)
staticprivate

Definition at line 40 of file progressbar.py.

progressbar.Timer.format

Definition at line 44 of file progressbar.py.

Referenced by progressbar.Timer.update(), progressbar.FormatLabel.update(), and genericValidation.ValidationWithPlotsSummaryBase.SummaryItem.values().

progressbar.Timer.TIME_SENSITIVE = True
static

Definition at line 41 of file progressbar.py.