aboutsummaryrefslogtreecommitdiff
path: root/Museum.h
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-13 14:05:11 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-13 14:05:11 +0200
commit165c1ae6e4a4eea35d7ea2f2a6518ff36cf0112f (patch)
tree78ab1efe1154551581808814ff962154b053ae23 /Museum.h
parent1a30375e369d2d872cb3fd6ecdc6019136c7b1a4 (diff)
separate view and museum thread
Diffstat (limited to 'Museum.h')
-rw-r--r--Museum.h18
1 files changed, 18 insertions, 0 deletions
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 <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();
};