comparison hgext/progress.py @ 10462:a94804a8087d stable

progress: make use of progress.refresh
author Patrick Mezard <pmezard@gmail.com>
date Sun, 14 Feb 2010 13:58:30 +0100
parents 7edc649f9f7e
children 5ddde896a19d
comparison
equal deleted inserted replaced
10461:0add1e265ac2 10462:a94804a8087d
155 self.resetstate() 155 self.resetstate()
156 else: 156 else:
157 if topic not in self.topics: 157 if topic not in self.topics:
158 self.topics.append(topic) 158 self.topics.append(topic)
159 now = time.time() 159 now = time.time()
160 if now - self.lastprint > 0.1 and topic == self.topics[-1]: 160 if now - self.lastprint > self.refresh and topic == self.topics[-1]:
161 self.lastprint = now 161 self.lastprint = now
162 self.show(topic, pos, item, unit, total) 162 self.show(topic, pos, item, unit, total)
163 return orig(topic, pos, item=item, unit=unit, total=total) 163 return orig(topic, pos, item=item, unit=unit, total=total)
164 164
165 def write(self, orig, *args): 165 def write(self, orig, *args):