summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-06-22 15:14:27 +0200
committerHarald Hoyer <harald@redhat.com>2012-06-29 12:41:25 +0200
commit28a6eef3bebfbeb81c95b1cf8129cbe85fe537d8 (patch)
tree8c45377378d25eb996f4be42a2add86275e516d7
parent69b35075f3a15ce29b211bc4fb6640e5ffddd871 (diff)
downloaddracut-28a6eef3bebfbeb81c95b1cf8129cbe85fe537d8.tar.gz
dracut-28a6eef3bebfbeb81c95b1cf8129cbe85fe537d8.tar.bz2
dracut-28a6eef3bebfbeb81c95b1cf8129cbe85fe537d8.zip
profile.py: do not count negative timestamp differences
-rw-r--r--profile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/profile.py b/profile.py
index e1d0cabf..7f98a136 100644
--- a/profile.py
+++ b/profile.py
@@ -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