all: move mach.Timer, core Timer/Frequency to mach.time module
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
d62ddbb6cd
commit
133c89638b
16 changed files with 90 additions and 110 deletions
|
|
@ -17,12 +17,12 @@ const Mat4x4 = math.Mat4x4;
|
|||
// TODO: banish global allocator
|
||||
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
|
||||
|
||||
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,
|
||||
|
|
@ -92,10 +92,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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue