diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-13 14:05:11 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-13 14:05:11 +0200 |
commit | 165c1ae6e4a4eea35d7ea2f2a6518ff36cf0112f (patch) | |
tree | 78ab1efe1154551581808814ff962154b053ae23 /Museum.h | |
parent | 1a30375e369d2d872cb3fd6ecdc6019136c7b1a4 (diff) |
separate view and museum thread
Diffstat (limited to 'Museum.h')
-rw-r--r-- | Museum.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1,14 +1,32 @@ #pragma once +#include <thread> +#include <chrono> + +using namespace std::chrono_literals; + #include "People.h" #include "Canvas.h" class Museum { public: + Museum(); + virtual ~Museum(); + +public: People people; Canvas canvas; public: + bool paused = false; + +private: void update(); + +private: + static constexpr std::chrono::milliseconds tick_interval = 10ms; + bool working = true; + std::thread * worker = nullptr; + void work(); }; |