more inlined stuff

This commit is contained in:
SimoneN64
2023-06-06 10:59:25 +02:00
parent be7f1fc5a0
commit 8fb0dd826d
3 changed files with 17 additions and 20 deletions

View File

@@ -3,19 +3,3 @@
#include <core/registers/Registers.hpp>
Scheduler scheduler;
void Scheduler::enqueueRelative(const Event& event) {
enqueueAbsolute({event.time + ticks, event.handler});
}
void Scheduler::enqueueAbsolute(const Event& e) {
events.push(e);
}
void Scheduler::tick(u64 t, n64::Mem& mem, n64::Registers& regs) {
ticks += t;
while(ticks >= events.top().time) {
events.top().handler(mem, regs);
events.pop();
}
}