openMSX
Public Member Functions | List of all members
openmsx::RealTime Class Referencefinal

#include <RealTime.hh>

Inheritance diagram for openmsx::RealTime:
Inheritance graph
[legend]
Collaboration diagram for openmsx::RealTime:
Collaboration graph
[legend]

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 ()
 

Detailed Description

Definition at line 22 of file RealTime.hh.

Constructor & Destructor Documentation

◆ RealTime()

openmsx::RealTime::RealTime ( MSXMotherBoard motherBoard,
GlobalSettings globalSettings,
EventDelay eventDelay 
)
explicit

◆ ~RealTime()

openmsx::RealTime::~RealTime ( )

Member Function Documentation

◆ disable()

void openmsx::RealTime::disable ( )

Definition at line 181 of file RealTime.cc.

References openmsx::Schedulable::removeSyncPoint().

◆ enable()

void openmsx::RealTime::enable ( )

Definition at line 175 of file RealTime.cc.

References resync().

◆ getEmuDuration()

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().

◆ getRealDuration()

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().

◆ resync()

void openmsx::RealTime::resync ( )

◆ timeLeft()

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.

Parameters
usReal time duration is micro seconds.
timePoint 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().


The documentation for this class was generated from the following files: