C++ (Qt)#ifndef TIME_H#define TIME_H #include <QElapsedTimer> class Time{ static QElapsedTimer timer; static qint64 startTime; static float _time; static qint64 _frames; static float _fps; static float _delta; static float _avrDelta; public: Time() = delete; static void tic(); inline static qint64 frames() { return _frames; } inline static float fps() { return _fps; } inline static float time() { return _time; } inline static float delta() { return _delta; } inline static float avrDelta() { return _avrDelta; }}; #endif // TIME_H
C++ (Qt)#ifndef TIME_H#define TIME_H
#include "MyDir/time.h"