1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

WindowServer: Port threading to LibThread

This commit is contained in:
Sergey Bugaev 2019-08-25 19:28:09 +03:00 committed by Andreas Kling
parent 1ac7fedefe
commit 8d59b10022
5 changed files with 43 additions and 53 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <AK/CircularQueue.h>
#include <LibThread/Thread.h>
#include <stdio.h>
class Painter;
@ -16,8 +17,11 @@ public:
void paint(Painter&, const Rect&);
private:
void monitor();
void get_cpu_usage(unsigned& busy, unsigned& idle);
CircularQueue<float, 30> m_cpu_history;
bool m_dirty { false };
LibThread::Thread m_thread;
};