summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Harris <peter.harris@hummingbird.com>2007-10-29 11:29:32 -0400
committerPeter Harris <pharris@opentext.com>2010-11-23 14:34:58 -0500
commit17a30e7c65c0b03b71b5b1ac54ae3ba33ae3b42a (patch)
tree41d6bede92741086171f017fdb9dead09366b391
parentb1c5b72bb4bb5f3e116255f9d04b368137ff25f7 (diff)
Clamp test time to positive values.
If there is some jitter in the sync time, operations can complete in a negative amount of time (confusing both humans and x11perfcomp). Signed-off-by: Peter Harris <pharris@opentext.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--x11perf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/x11perf.c b/x11perf.c
index 08c0062..c1fb5c2 100644
--- a/x11perf.c
+++ b/x11perf.c
@@ -647,6 +647,7 @@ DoTest(XParms xp, Test *test, int reps)
HardwareSync(xp);
time = ElapsedTime(syncTime);
+ if (time < 0.0) time = 0.0;
CheckAbort ();
if (drawToFakeServer)
XQueryBestSize(xp->d, TileShape, tileToQuery,