Revision 5104
Added by Aaron Marcuse-Kubitza about 12 years ago
lib/profiling.py | ||
---|---|---|
11 | 11 |
self.total = datetime.timedelta() |
12 | 12 |
if start_now: self.start() |
13 | 13 |
|
14 |
def start(self): self.start = dates.now() |
|
14 |
def start(self): self.start_ = dates.now()
|
|
15 | 15 |
|
16 | 16 |
def stop(self): |
17 |
assert self.start != None |
|
18 |
self.total += dates.now() - self.start |
|
17 |
assert self.start_ != None
|
|
18 |
self.total += dates.now() - self.start_
|
|
19 | 19 |
|
20 | 20 |
def msg(self): return 'Took '+str(self.total)+' sec' |
21 | 21 |
|
Also available in: Unified diff
profiling.py: Profiler: Fixed bug where instance variable start had the same name as method start()