mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-11 14:35:06 +12:00
First stuff running with scheduler
This commit is contained in:
parent
97f97dc6e2
commit
fa82dad38d
5 changed files with 86 additions and 36 deletions
include
|
@ -18,6 +18,7 @@ struct Scheduler {
|
|||
using EventMap = boost::container::flat_multimap<Key, Val, std::less<Key>, boost::container::static_vector<std::pair<Key, Val>, size>>;
|
||||
|
||||
EventMap<u64, EventType, totalNumberOfEvents> events;
|
||||
u64 currentTimestamp = 0;
|
||||
u64 nextTimestamp = 0;
|
||||
|
||||
// Set nextTimestamp to the timestamp of the next event
|
||||
|
@ -38,6 +39,8 @@ struct Scheduler {
|
|||
};
|
||||
|
||||
void reset() {
|
||||
currentTimestamp = 0;
|
||||
|
||||
// Clear any pending events
|
||||
events.clear();
|
||||
// Add a dummy event to always keep the scheduler non-empty
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue