feat(cpu): implement HALT

This commit is contained in:
2023-11-04 01:21:52 -05:00
parent 16b3325fe3
commit 83f94f6d9d
4 changed files with 52 additions and 15 deletions

View File

@@ -41,6 +41,10 @@ pub fn reset(self: *@This()) void {
self.tick = 0;
}
pub inline fn peekTimestamp(self: *const @This()) u64 {
return self.queue.items[0].tick;
}
pub inline fn check(self: *@This()) ?Event {
@setRuntimeSafety(false);
if (self.tick < self.queue.items[0].tick) return null;