mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:32:43 +00:00 
			
		
		
		
	 7c617394a1
			
		
	
	
		7c617394a1
		
	
	
	
	
		
			
			We try to read twice from the RTC CMOS registers, and if the values are not the same for 5 attempts, we know there's a malfunction with the hardware so we declare these values as bogus in the kernel log.
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			235 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			235 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <Kernel/UnixTypes.h>
 | |
| 
 | |
| namespace RTC {
 | |
| 
 | |
| void initialize();
 | |
| time_t now();
 | |
| time_t boot_time();
 | |
| 
 | |
| }
 |