~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/progress.py

  • Committer: Martin Pool
  • Date: 2009-08-03 05:14:06 UTC
  • mto: This revision was merged to the branch mainline in revision 4584.
  • Revision ID: mbp@sourcefrog.net-20090803051406-fo0em99upsp5m3ge
ProgressTasks can specify an update latency

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
    Code updating the task may also set fields as hints about how to display
70
70
    it: show_pct, show_spinner, show_eta, show_count, show_bar.  UIs
71
71
    will not necessarily respect all these fields.
 
72
    
 
73
    :ivar update_latency: The interval (in seconds) at which the PB should be
 
74
        updated.  Setting this to zero suggests every update should be shown
 
75
        synchronously.
72
76
    """
73
77
 
74
78
    def __init__(self, parent_task=None, ui_factory=None, progress_view=None):
97
101
        self.show_eta = False,
98
102
        self.show_count = True
99
103
        self.show_bar = True
 
104
        self.update_latency = 0.1
100
105
 
101
106
    def __repr__(self):
102
107
        return '%s(%r/%r, msg=%r)' % (