feat: PCI-e, APIC timer

This commit is contained in:
daniel committed 2026-02-17 12:54:31 +01:00
1 parent a3859dc3c4
commit f7e6ce70a0
5 files changed
+629

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
/*
* ApicTimer.hpp
* Local APIC timer for periodic tick interrupts and timekeeping
* Copyright (c) 2025 Daniel Hammer
*/
#pragma once
#include <cstdint>
namespace Timekeeping {
// Initialize the APIC timer: calibrate against PIT, start periodic interrupts
void ApicTimerInitialize();
// Get the monotonic tick count (increments on each timer interrupt)
uint64_t GetTicks();
// Get elapsed milliseconds since timer initialization
uint64_t GetMilliseconds();
// Busy-wait sleep for the given number of milliseconds
void Sleep(uint64_t ms);
};