MeshLib Documentation
Loading...
Searching...
No Matches
MRFrameCounter.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRViewerFwd.h"
4#include <chrono>
5
6namespace MR
7{
8
10{
11public:
12 size_t totalFrameCounter{ 0 };
14 size_t startFrameNum{ 0 };
15 size_t fps{ 0 };
16 std::chrono::duration<double> drawTimeMilliSec{ 0 };
17
18 void startDraw() { startDrawTime_ = std::chrono::high_resolution_clock::now(); }
19 MRVIEWER_API void endDraw( bool swapped );
20 MRVIEWER_API void reset();
21
22private:
23 long long startFPSTime_{ 0 };
24 std::chrono::time_point<std::chrono::high_resolution_clock> startDrawTime_;
25};
26
27} //namespace MR
Definition MRFrameCounter.h:10
size_t fps
Definition MRFrameCounter.h:15
MRVIEWER_API void endDraw(bool swapped)
void startDraw()
Definition MRFrameCounter.h:18
size_t swappedFrameCounter
Definition MRFrameCounter.h:13
MRVIEWER_API void reset()
std::chrono::duration< double > drawTimeMilliSec
Definition MRFrameCounter.h:16
size_t totalFrameCounter
Definition MRFrameCounter.h:12
size_t startFrameNum
Definition MRFrameCounter.h:14
Definition MRCameraOrientationPlugin.h:8