feat(kernel): add Kernel struct, MockPlatform, and simple syscalls (GetTime, GetProcessId, Yield)

This commit is contained in:
2026-10-18 00:15:40 +02:00
parent 8dd36e7d6d
commit d0a0ba788f
9 changed files with 355 additions and 10 deletions

View File

@@ -2,6 +2,14 @@
pub struct Ticks(u64);
impl Ticks {
pub fn from_raw(value: u64) -> Self {
Self(value)
}
pub fn raw(&self) -> u64 {
self.0
}
pub fn elapsed_since(&self, earlier: &Ticks) -> Ticks {
Ticks(self.0.saturating_sub(earlier.0))
}