mirror of
https://github.com/hyprwm/Hyprland.git
synced 2026-02-07 14:15:27 +00:00
input basics
This commit is contained in:
22
src/ManagerThread.cpp
Normal file
22
src/ManagerThread.cpp
Normal file
@ -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")));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user