QmlProfiler: Don't trust in externally provided timestamps

We might get timestamps that are outside the trace time, negative
timestamps, ranges that go backwards, and other insane things.

In order to deal with this, we clamp all negative timestamps to 0, and
treat the specified trace time as minimum range, that can be overridden
by events.

Change-Id: Iba661f2a4346077871fc62a46759e169b2aad49d
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
This commit is contained in:
Ulf Hermann
2017-09-08 17:35:28 +02:00
parent 8fa07c81f6
commit 9cdb0ec22e
6 changed files with 28 additions and 13 deletions

View File

@@ -58,7 +58,7 @@ public:
void clear();
void setTime(qint64 startTime, qint64 endTime);
void update(qint64 time);
void decreaseStartTime(qint64 time);
void increaseEndTime(qint64 time);
void restrictToRange(qint64 startTime, qint64 endTime);