diff --git a/src/scheduler.zig b/src/scheduler.zig index 62a2ca5..0735291 100644 --- a/src/scheduler.zig +++ b/src/scheduler.zig @@ -13,13 +13,13 @@ const PIXELBUF_LEN = disp.PIXELBUF_LEN; pub const Scheduler = struct { pixels_ptr: *[PIXELBUF_LEN]u8, timestamp: u64, - queue: PriorityQueue(Event), + queue: PriorityQueue(Event, lessThan), pub fn new(alloc: *Allocator, pixels_ptr: *[PIXELBUF_LEN]u8) Scheduler { var queue = Scheduler{ .timestamp = 0, .pixels_ptr = pixels_ptr, - .queue = PriorityQueue(Event).init(alloc, less_than), + .queue = PriorityQueue(Event, lessThan).init(alloc), }; queue.pushEvent(.{ @@ -88,7 +88,7 @@ pub const EventKind = enum { DelayTimer, }; -fn less_than(a: Event, b: Event) Order { +fn lessThan(a: Event, b: Event) Order { return std.math.order(a.timestamp, b.timestamp); }