mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-23 13:15:45 +00:00
hle: kernel: TimeManager: Simplify to not rely on previous EmuThreadHandle implementation.
This commit is contained in:
parent
7351708eea
commit
86206c81c2
6 changed files with 25 additions and 69 deletions
|
@ -31,18 +31,14 @@ public:
|
|||
explicit TimeManager(Core::System& system);
|
||||
|
||||
/// Schedule a time event on `timetask` thread that will expire in 'nanoseconds'
|
||||
/// returns a non-invalid handle in `event_handle` if correctly scheduled
|
||||
void ScheduleTimeEvent(Handle& event_handle, KThread* timetask, s64 nanoseconds);
|
||||
void ScheduleTimeEvent(KThread* time_task, s64 nanoseconds);
|
||||
|
||||
/// Unschedule an existing time event
|
||||
void UnscheduleTimeEvent(Handle event_handle);
|
||||
|
||||
void CancelTimeEvent(KThread* time_task);
|
||||
void UnscheduleTimeEvent(KThread* thread);
|
||||
|
||||
private:
|
||||
Core::System& system;
|
||||
std::shared_ptr<Core::Timing::EventType> time_manager_event_type;
|
||||
std::unordered_map<Handle, bool> cancelled_events;
|
||||
std::mutex mutex;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue