From 165c1ae6e4a4eea35d7ea2f2a6518ff36cf0112f Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Sun, 13 Oct 2024 14:05:11 +0200 Subject: separate view and museum thread --- Museum.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Museum.h') diff --git a/Museum.h b/Museum.h index 2677041..ce4db3a 100644 --- a/Museum.h +++ b/Museum.h @@ -1,14 +1,32 @@ #pragma once +#include +#include + +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(); }; -- cgit v1.2.3