diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-17 15:53:45 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-03-17 16:19:10 +0100 |
| commit | cf51ab71a25cbb60ebcf13edd4b7413c23264128 (patch) | |
| tree | 18b649470346c8815a156b5599ee7be1c4135a79 /src/ManagerThread.cpp | |
| parent | 52090853dafb75dd99969a0cecdd291c109210f8 (diff) | |
input basics
Diffstat (limited to 'src/ManagerThread.cpp')
| -rw-r--r-- | src/ManagerThread.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ManagerThread.cpp b/src/ManagerThread.cpp new file mode 100644 index 00000000..8ddb3b53 --- /dev/null +++ b/src/ManagerThread.cpp @@ -0,0 +1,22 @@ +#include "ManagerThread.hpp" + +CManagerThread::CManagerThread() { + m_tMainThread = new std::thread([=]() { + // Call the handle method. + this->handle(); + }); + + m_tMainThread->detach(); // detach and continue. +} + +CManagerThread::~CManagerThread() { + // +} + +void CManagerThread::handle() { + while (3.1415f) { + g_pConfigManager->tick(); + + std::this_thread::sleep_for(std::chrono::microseconds(1000000 / g_pConfigManager->getInt("max_fps"))); + } +}
\ No newline at end of file |
