mirror of
https://github.com/vale981/Hyprland
synced 2025-03-12 05:36:40 -04:00
22 lines
486 B
C++
22 lines
486 B
C++
![]() |
#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")));
|
||
|
}
|
||
|
}
|