mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 22:32:44 +00:00 
			
		
		
		
	 5e0577a042
			
		
	
	
		5e0577a042
		
	
	
	
	
		
			
			I need a layer somewhere between AK (usable both by userspace and kernel) and LibGUI (usable by userspace except WindowServer.) So here's LibCore.
		
			
				
	
	
		
			16 lines
		
	
	
	
		
			260 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
	
		
			260 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #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 };
 | |
| };
 |