mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
WindowServer: Move the CPU monitor thingy to its own class.
This commit is contained in:
parent
f1b58d8d8c
commit
c2093ad994
6 changed files with 106 additions and 83 deletions
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "Assertions.h"
|
||||
#include "Types.h"
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
|
@ -19,15 +19,6 @@ public:
|
|||
|
||||
int capacity() const { return Capacity; }
|
||||
|
||||
void dump() const
|
||||
{
|
||||
kprintf("CircularQueue<%zu>:\n", Capacity);
|
||||
kprintf(" size: %zu\n", m_size);
|
||||
for (int i = 0; i < Capacity; ++i) {
|
||||
kprintf(" [%zu] %d %c\n", i, m_elements[i], i == m_head ? '*' : ' ');
|
||||
}
|
||||
}
|
||||
|
||||
void enqueue(const T& t)
|
||||
{
|
||||
m_elements[(m_head + m_size) % Capacity] = t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue