Krita Source Code Documentation
Loading...
Searching...
No Matches
KisLatencyTracker Class Referenceabstract

#include <kis_latency_tracker.h>

+ Inheritance diagram for KisLatencyTracker:

Public Member Functions

 KisLatencyTracker (int windowSize=500)
 
virtual void push (qint64 timestamp) override
 
- Public Member Functions inherited from KisScalarTracker< qint64 >
 KisScalarTracker (const QString &name, int windowSize=500)
 
virtual ~KisScalarTracker ()
 
- Public Member Functions inherited from KisShared
bool deref ()
 
bool ref ()
 
int refCount ()
 
QAtomicInt * sharedWeakReference ()
 

Protected Member Functions

virtual qint64 currentTimestamp () const =0
 
- Protected Member Functions inherited from KisScalarTracker< qint64 >
virtual QString format (qint64 mean, qint64 variance, qint64 max)
 
virtual void print (const QString &message)
 
- Protected Member Functions inherited from KisShared
 KisShared ()
 
 ~KisShared ()
 

Detailed Description

KisLatencyTracker tracks the time it takes events to reach a certain point in the program.

Definition at line 136 of file kis_latency_tracker.h.

Constructor & Destructor Documentation

◆ KisLatencyTracker()

KisLatencyTracker::KisLatencyTracker ( int windowSize = 500)

Create a tracker with the given window size.

Parameters
windowThe maximum number of elements to take into account for calculation of max, mean and variance values.

Definition at line 9 of file kis_latency_tracker.cpp.

9 :
10 KisScalarTracker<qint64>("event latency", windowSize)
11{
12}

Member Function Documentation

◆ currentTimestamp()

virtual qint64 KisLatencyTracker::currentTimestamp ( ) const
protectedpure virtual
Returns
The timestamp of "right now" in a frame that is comparable to those timestamps given to push().

Implemented in KisInputManager::Private::TabletLatencyTracker.

◆ push()

void KisLatencyTracker::push ( qint64 timestamp)
overridevirtual

Register that an event with the given timestamp has arrived just now.

Parameters
timestampTimestamp of the event that just arrived (the difference to the current time is the latency).

Reimplemented from KisScalarTracker< qint64 >.

Definition at line 14 of file kis_latency_tracker.cpp.

15{
16 const qint64 latency = currentTimestamp() - timestamp;
18}
virtual qint64 currentTimestamp() const =0
virtual void push(T value)

References currentTimestamp(), and KisScalarTracker< T >::push().


The documentation for this class was generated from the following files: