mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-08-21 11:05:00 +00:00
.github
.vscode
Architecture
Core
Execute
FileSystem
Library
SystemCalls
Tasking
include
boot
filesystem
abi.h
assert.h
atomic.hpp
bitmap.hpp
cargs.h
convert.h
cpu.hpp
crc32.h
cstring
cwalk.h
debug.h
disk.hpp
display.hpp
driver.hpp
dumper.hpp
elf.h
exec.hpp
filesystem.hpp
hashmap.hpp
interrupts.hpp
io.h
ipc.hpp
kconfig.hpp
limits.h
lock.hpp
md5.h
memory.hpp
msexec.h
pci.hpp
power.hpp
printf.h
rand.hpp
smartptr.hpp
smp.hpp
stdint.h
symbols.hpp
sys.h
syscalls.hpp
task.hpp
time.hpp
types.h
uart.hpp
vector.hpp
.gitignore
DAPI.hpp
Doxyfile
Fex.hpp
KConfig.cpp
KThread.cpp
Kernel.cpp
LICENSE
Makefile
README.md
kernel.h
syscalls.h
44 lines
856 B
C++
44 lines
856 B
C++
#ifndef __FENNIX_KERNEL_TIME_H__
|
|
#define __FENNIX_KERNEL_TIME_H__
|
|
|
|
#include <types.h>
|
|
|
|
namespace Time
|
|
{
|
|
struct Clock
|
|
{
|
|
uint64_t Year, Month, Day, Hour, Minute, Second;
|
|
uint64_t Counter;
|
|
};
|
|
|
|
Clock ReadClock();
|
|
|
|
class time
|
|
{
|
|
private:
|
|
struct HPET
|
|
{
|
|
uint64_t GeneralCapabilities;
|
|
uint64_t Reserved0;
|
|
uint64_t GeneralConfiguration;
|
|
uint64_t Reserved1;
|
|
uint64_t GeneralIntStatus;
|
|
uint64_t Reserved2;
|
|
uint64_t Reserved3[24];
|
|
uint64_t MainCounterValue;
|
|
uint64_t Reserved4;
|
|
};
|
|
|
|
void *acpi;
|
|
void *hpet;
|
|
uint32_t clk = 0;
|
|
|
|
public:
|
|
void Sleep(uint64_t Milliseconds);
|
|
time(void *acpi);
|
|
~time();
|
|
};
|
|
}
|
|
|
|
#endif // !__FENNIX_KERNEL_TIME_H__
|