all: move mach.Timer, core Timer/Frequency to mach.time module

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2024-08-25 14:24:09 -07:00
parent d62ddbb6cd
commit 133c89638b
16 changed files with 90 additions and 110 deletions

View file

@ -12,12 +12,12 @@ const Mat4x4 = math.Mat4x4;
const Glyphs = @import("Glyphs.zig");
timer: mach.Timer,
timer: mach.time.Timer,
player: mach.EntityID,
direction: Vec2 = vec2(0, 0),
spawning: bool = false,
spawn_timer: mach.Timer,
fps_timer: mach.Timer,
spawn_timer: mach.time.Timer,
fps_timer: mach.time.Timer,
frame_count: usize,
sprites: usize,
rand: std.rand.DefaultPrng,
@ -88,10 +88,10 @@ fn init(
sprite.schedule(.update);
app.init(.{
.timer = try mach.Timer.start(),
.spawn_timer = try mach.Timer.start(),
.timer = try mach.time.Timer.start(),
.spawn_timer = try mach.time.Timer.start(),
.player = player,
.fps_timer = try mach.Timer.start(),
.fps_timer = try mach.time.Timer.start(),
.frame_count = 0,
.sprites = 0,
.rand = std.rand.DefaultPrng.init(1337),