[pypy-svn] r54325 - pypy/branch/oo-jit/pypy/translator/goal
antocuni at codespeak.net
antocuni at codespeak.net
Fri May 2 16:18:51 CEST 2008
Author: antocuni
Date: Fri May 2 16:18:51 2008
New Revision: 54325
Modified:
pypy/branch/oo-jit/pypy/translator/goal/timing.py
Log:
don't crash on error because of missing tk attribute
Modified: pypy/branch/oo-jit/pypy/translator/goal/timing.py
==============================================================================
--- pypy/branch/oo-jit/pypy/translator/goal/timing.py (original)
+++ pypy/branch/oo-jit/pypy/translator/goal/timing.py Fri May 2 16:18:51 2008
@@ -15,6 +15,7 @@
self.next_even = None
self.timer = timer
self.t0 = None
+ self.tk = None
def start_event(self, event):
now = self.timer()
@@ -31,6 +32,8 @@
self.tk = now
def ttime(self):
+ if self.tk is None:
+ return -1
return self.tk - self.t0
def pprint(self):
More information about the pypy-svn
mailing list