core: move system contents and remove dir

This commit is contained in:
Arran Ireland
2025-07-08 11:35:00 +01:00
parent ebf73cdfe1
commit 7cfc489911
2 changed files with 12 additions and 9 deletions

View File

@@ -1,7 +1,18 @@
const std = @import("std");
// TODO: Add storage interface.
pub const Clock = @import("system/Clock.zig");
pub const Clock = struct {
const Self = @This();
ptr: *anyopaque,
monotonicMicrosFn: *const fn (ptr: *anyopaque) u64,
pub fn monotonicMicros(self: *Self) u64 {
return self.monotonicMicrosFn(self.ptr);
}
};
pub const Rng = std.Random;
clock: Clock,

View File

@@ -1,8 +0,0 @@
const Self = @This();
ptr: *anyopaque,
monotonicMicrosFn: *const fn (ptr: *anyopaque) u64,
pub fn monotonicMicros(self: *Self) u64 {
return self.monotonicMicrosFn(self.ptr);
}