Add FPS counter

This commit is contained in:
2023-02-18 15:55:25 +01:00
parent 2daafde7f2
commit 4da6ad7d28
3 changed files with 16 additions and 0 deletions

View File

@ -11,6 +11,7 @@
class DmxController : public QObject
{
Q_OBJECT
Q_PROPERTY(int performance READ performance NOTIFY performanceChanged)
public:
explicit DmxController(QObject *parent = nullptr);
@ -24,6 +25,11 @@ public:
QReadWriteLock &projectLock() { return m_projectLock; }
int performance() const { return m_lastCounter; }
signals:
void performanceChanged(int performance);
protected:
friend class DmxControllerThread;
@ -41,4 +47,5 @@ private:
QDateTime m_lastInfo;
int m_counter;
std::atomic<int> m_lastCounter;
};