18 : timeStamp(time), device(dev) {}
19 [[nodiscard]] EmuTime::param
getTime()
const {
return timeStamp; }
20 void setTime(EmuTime::param time) { timeStamp = time; }
23 template<
typename Archive>
24 void serialize(Archive& ar,
unsigned version);
27 EmuTime timeStamp = EmuTime::zero();
53 [[nodiscard]]
inline EmuTime::param
getNext()
const
55 return queue.front().getTime();
63 if (EmuTime next =
getNext(); limit >= next) [[unlikely]] {
64 scheduleHelper(limit, next);
69 template<
typename Archive>
70 void serialize(Archive& ar,
unsigned version);
84 void setSyncPoint(EmuTime::param timestamp,
Schedulable& device);
104 [[nodiscard]]
bool pendingSyncPoint(
const Schedulable& device, EmuTime& result)
const;
107 void scheduleHelper(EmuTime::param limit, EmuTime next);
114 EmuTime scheduleTime = EmuTime::zero();
116 bool scheduleInProgress =
false;
Every class that wants to get scheduled at some point must inherit from this class.
EmuTime::param getCurrentTime() const
Get the current scheduler time.
void schedule(EmuTime::param limit)
Schedule till a certain moment in time.
void serialize(Archive &ar, unsigned version)
void setCPU(MSXCPU *cpu_)
std::vector< SynchronizationPoint > SyncPoints
EmuTime::param getNext() const
TODO.
void serialize(Archive &ar, unsigned version)
SynchronizationPoint()=default
SynchronizationPoint(EmuTime::param time, Schedulable *dev)
void setTime(EmuTime::param time)
EmuTime::param getTime() const
Schedulable * getDevice() const
This file implemented 3 utility functions: