profile.py: do not count negative timestamp differences

master
Harald Hoyer 2012-06-22 15:14:27 +02:00
parent 69b35075f3
commit 28a6eef3be
1 changed files with 2 additions and 1 deletions

View File

@ -36,7 +36,8 @@ def gen_times(t):
fx=float(x[0])
if oldx:
#print fx - float(oldx[0]), x[0], x[1], oldx[0], oldx[1]
yield (fx - float(oldx[0]), oldx[1])
if ((fx - float(oldx[0])) > 0):
yield (fx - float(oldx[0]), oldx[1])

oldx = x