8 : scheduler(scheduler_)
19 std::cerr <<
"Internal error: Schedulable \"" <<
typeid(*this).name()
20 <<
"\" failed to unregister.\n";
25 scheduler.setSyncPoint(timestamp, *
this);
30 return scheduler.removeSyncPoint(*
this);
35 scheduler.removeSyncPoints(*
this);
40 auto dummy = EmuTime::dummy();
41 return scheduler.pendingSyncPoint(*
this, dummy);
46 return scheduler.pendingSyncPoint(*
this, result);
54 template <
typename Archive>
59 syncPoints = scheduler.getSyncPoints(*
this);
61 ar.serialize(
"syncPoints", syncPoints);
64 for (
auto& s : syncPoints) {
bool pendingSyncPoint() const
EmuTime::param getCurrentTime() const
Convenience method: This is the same as getScheduler().getCurrentTime().
virtual void schedulerDeleted()
Just before the the Scheduler is deleted, it calls this method of all the Schedulables that are still...
void serialize(Archive &ar, unsigned version)
EmuTime::param getCurrentTime() const
Get the current scheduler time.
Every class that wants to get scheduled at some point must inherit from this class.
std::vector< SynchronizationPoint > SyncPoints
Thanks to enen for testing this on a real cartridge:
Schedulable(const Schedulable &)=delete
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)
void setSyncPoint(EmuTime::param timestamp)