CMS 3D CMS Logo

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__ (self, format='Elapsed Time:%s')
 
def update (self, pbar)
 

Static Public Member Functions

def format_time (seconds)
 

Public Attributes

 format
 

Static Public Attributes

 TIME_SENSITIVE
 
- Static Public Attributes inherited from progressbar.Widget
 TIME_SENSITIVE
 

Static Private Attributes

 __slots__
 

Detailed Description

Definition at line 37 of file progressbar.py.

Constructor & Destructor Documentation

◆ __init__()

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

Reimplemented in progressbar.FormatLabel.

Definition at line 43 of file progressbar.py.

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

Member Function Documentation

◆ format_time()

def progressbar.Timer.format_time (   seconds)
static

Definition at line 47 of file progressbar.py.

47  def format_time(seconds):
48  'Formats time as the string "HH:MM:SS".'
49 
50  return str(datetime.timedelta(seconds=int(seconds)))
51 
52 

References createfilelist.int, and str.

Referenced by progressbar.Timer.update().

◆ update()

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.

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

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().

Member Data Documentation

◆ __slots__

progressbar.Timer.__slots__
staticprivate

Definition at line 40 of file progressbar.py.

◆ format

progressbar.Timer.format

◆ TIME_SENSITIVE

progressbar.Timer.TIME_SENSITIVE
static

Definition at line 41 of file progressbar.py.

str
#define str(s)
Definition: TestProcessor.cc:53
createfilelist.int
int
Definition: createfilelist.py:10
update
#define update(a, b)
Definition: TrackClassifier.cc:10