mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
Introduce LibCore and move GElapsedTimer => CElapsedTimer.
I need a layer somewhere between AK (usable both by userspace and kernel) and LibGUI (usable by userspace except WindowServer.) So here's LibCore.
This commit is contained in:
parent
a74f3615ac
commit
5e0577a042
21 changed files with 98 additions and 37 deletions
16
LibCore/CElapsedTimer.h
Normal file
16
LibCore/CElapsedTimer.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <time.h>
|
||||
|
||||
class CElapsedTimer {
|
||||
public:
|
||||
CElapsedTimer() { }
|
||||
|
||||
bool is_valid() const { return m_valid; }
|
||||
void start();
|
||||
int elapsed() const;
|
||||
|
||||
private:
|
||||
bool m_valid { false };
|
||||
struct timeval m_start_time { 0, 0 };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue