io_interface: Added a mock for now() which simply returns the scheduler's time regardless of the specified clock

This commit is contained in:
2026-05-22 10:44:28 +02:00
parent d920e2c516
commit c663ed56f0
+5 -2
View File
@@ -849,9 +849,12 @@ fn progressParentFile(userdata: ?*anyopaque) std.Progress.ParentFileError!File {
}
fn now(userdata: ?*anyopaque, clock: Clock) Timestamp {
_ = userdata;
const node: *Node = @ptrCast(@alignCast(userdata.?));
// TODO: Return an appropriate time for each clock
_ = clock;
@panic("Not implemented yet");
return .{ .nanoseconds = node.scheduler.current_time * 1000 };
}
fn clockResolution(userdata: ?*anyopaque, clock: Clock) Clock.ResolutionError!Duration {