16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 19:29:19 +02:00

Merge branch 'milek-dev' into gfx-work

This commit is contained in:
milek7
2018-07-18 13:51:11 +02:00
85 changed files with 3834 additions and 8300 deletions

View File

@@ -29,6 +29,9 @@ void UpdateTimers(bool pause);
class stopwatch {
public:
// constructors
stopwatch() = default;
// methods
void
start() {
m_start = std::chrono::steady_clock::now(); }
@@ -40,6 +43,7 @@ public:
return m_accumulator / 20.f;}
private:
// members
std::chrono::time_point<std::chrono::steady_clock> m_start { std::chrono::steady_clock::now() };
float m_accumulator { 1000.f / 30.f * 20.f }; // 20 last samples, initial 'neutral' rate of 30 fps
};