~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/text.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:
224
224
        self._bytes_since_update = 0
225
225
 
226
226
    def _show_line(self, s):
 
227
        # sys.stderr.write("progress %r\n" % s)
227
228
        n = self._width - 1
228
229
        self._term_file.write('\r%-*.*s\r' % (n, n, s))
229
230
 
302
303
        must_update = task is not self._last_task
303
304
        self._last_task = task
304
305
        now = time.time()
305
 
        if (not must_update) and (now < self._last_repaint + 0.1):
 
306
        if (not must_update) and (now < self._last_repaint + task.update_latency):
306
307
            return
307
308
        if now > self._transport_update_time + 10:
308
309
            # no recent activity; expire it