openMSX
|
#include <RealTime.hh>
Public Member Functions | |
RealTime (MSXMotherBoard &motherBoard, GlobalSettings &globalSettings, EventDelay &eventDelay) | |
~RealTime () | |
double | getRealDuration (EmuTime::param time1, EmuTime::param time2) const |
Convert EmuTime to RealTime. | |
EmuDuration | getEmuDuration (double realDur) const |
Convert RealTime to EmuTime. | |
bool | timeLeft (uint64_t us, EmuTime::param time) const |
Check that there is enough real time left before we reach as certain point in emulated time. | |
void | resync () |
void | enable () |
void | disable () |
Definition at line 22 of file RealTime.hh.
|
explicit |
Definition at line 22 of file RealTime.cc.
References openmsx::Subject< T >::attach(), openmsx::FINISH_FRAME, openmsx::FRAME_DRAWN, openmsx::EventDistributor::registerEventListener(), and resync().
openmsx::RealTime::~RealTime | ( | ) |
Definition at line 46 of file RealTime.cc.
References openmsx::Subject< T >::detach(), openmsx::FINISH_FRAME, openmsx::FRAME_DRAWN, and openmsx::EventDistributor::unregisterEventListener().
void openmsx::RealTime::disable | ( | ) |
Definition at line 181 of file RealTime.cc.
References openmsx::Schedulable::removeSyncPoint().
void openmsx::RealTime::enable | ( | ) |
Definition at line 175 of file RealTime.cc.
References resync().
EmuDuration openmsx::RealTime::getEmuDuration | ( | double | realDur | ) | const |
Convert RealTime to EmuTime.
Definition at line 62 of file RealTime.cc.
References openmsx::SpeedManager::getSpeed().
Referenced by resync().
double openmsx::RealTime::getRealDuration | ( | EmuTime::param | time1, |
EmuTime::param | time2 | ||
) | const |
Convert EmuTime to RealTime.
Definition at line 57 of file RealTime.cc.
References openmsx::SpeedManager::getSpeed().
Referenced by timeLeft().
void openmsx::RealTime::resync | ( | ) |
Definition at line 164 of file RealTime.cc.
References openmsx::Schedulable::getCurrentTime(), getEmuDuration(), openmsx::Timer::getTime(), openmsx::Schedulable::removeSyncPoint(), openmsx::Schedulable::setSyncPoint(), and openmsx::SYNC_INTERVAL.
Referenced by openmsx::MSXCPUInterface::doContinue(), enable(), and RealTime().
bool openmsx::RealTime::timeLeft | ( | uint64_t | us, |
EmuTime::param | time | ||
) | const |
Check that there is enough real time left before we reach as certain point in emulated time.
us | Real time duration is micro seconds. |
time | Point in emulated time. |
Definition at line 67 of file RealTime.cc.
References openmsx::ALLOWED_LAG, getRealDuration(), and openmsx::Timer::getTime().
Referenced by openmsx::PixelRenderer::frameStart(), and openmsx::V9990PixelRenderer::frameStart().