openMSX
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
openmsx::EmuDuration Class Reference

#include <EmuDuration.hh>

Collaboration diagram for openmsx::EmuDuration:
Collaboration graph
[legend]

Public Types

using param = const EmuDuration &
 

Public Member Functions

 EmuDuration ()=default
 
 EmuDuration (uint64_t n)
 
 EmuDuration (double duration)
 
double toDouble () const
 
uint64_t length () const
 
bool operator== (EmuDuration::param d) const
 
bool operator!= (EmuDuration::param d) const
 
bool operator< (EmuDuration::param d) const
 
bool operator<= (EmuDuration::param d) const
 
bool operator> (EmuDuration::param d) const
 
bool operator>= (EmuDuration::param d) const
 
EmuDuration operator% (EmuDuration::param d) const
 
EmuDuration operator+ (EmuDuration::param d) const
 
EmuDuration operator* (unsigned fact) const
 
EmuDuration operator/ (unsigned fact) const
 
EmuDuration divRoundUp (unsigned fact) const
 
unsigned operator/ (EmuDuration::param d) const
 
unsigned divUp (EmuDuration::param d) const
 
double div (EmuDuration::param d) const
 
EmuDurationoperator*= (unsigned fact)
 
EmuDurationoperator*= (double fact)
 
EmuDurationoperator/= (double fact)
 
unsigned getTicksAt (unsigned freq) const
 
template<typename Archive >
void serialize (Archive &ar, unsigned version)
 

Static Public Member Functions

static EmuDuration sec (unsigned x)
 
static EmuDuration msec (unsigned x)
 
static EmuDuration usec (unsigned x)
 
static EmuDuration hz (unsigned x)
 

Static Public Attributes

static const EmuDuration zero
 
static const EmuDuration infinity
 

Friends

class EmuTime
 

Detailed Description

Definition at line 15 of file EmuDuration.hh.

Member Typedef Documentation

◆ param

Definition at line 24 of file EmuDuration.hh.

Constructor & Destructor Documentation

◆ EmuDuration() [1/3]

openmsx::EmuDuration::EmuDuration ( )
default

◆ EmuDuration() [2/3]

openmsx::EmuDuration::EmuDuration ( uint64_t  n)
inlineexplicit

Definition at line 32 of file EmuDuration.hh.

◆ EmuDuration() [3/3]

openmsx::EmuDuration::EmuDuration ( double  duration)
inlineexplicit

Definition at line 33 of file EmuDuration.hh.

Member Function Documentation

◆ div()

double openmsx::EmuDuration::div ( EmuDuration::param  d) const
inline

Definition at line 90 of file EmuDuration.hh.

◆ divRoundUp()

EmuDuration openmsx::EmuDuration::divRoundUp ( unsigned  fact) const
inline

Definition at line 72 of file EmuDuration.hh.

References EmuDuration().

Referenced by openmsx::ReverseManager::~ReverseManager().

◆ divUp()

unsigned openmsx::EmuDuration::divUp ( EmuDuration::param  d) const
inline

Definition at line 83 of file EmuDuration.hh.

◆ getTicksAt()

unsigned openmsx::EmuDuration::getTicksAt ( unsigned  freq) const
inline

Definition at line 102 of file EmuDuration.hh.

References serialize().

Referenced by openmsx::LaserdiscPlayer::extControl().

◆ hz()

static EmuDuration openmsx::EmuDuration::hz ( unsigned  x)
inlinestatic

◆ length()

uint64_t openmsx::EmuDuration::length ( ) const
inline

Definition at line 47 of file EmuDuration.hh.

◆ msec()

static EmuDuration openmsx::EmuDuration::msec ( unsigned  x)
inlinestatic

◆ operator!=()

bool openmsx::EmuDuration::operator!= ( EmuDuration::param  d) const
inline

Definition at line 52 of file EmuDuration.hh.

◆ operator%()

EmuDuration openmsx::EmuDuration::operator% ( EmuDuration::param  d) const
inline

Definition at line 64 of file EmuDuration.hh.

References EmuDuration().

◆ operator*()

EmuDuration openmsx::EmuDuration::operator* ( unsigned  fact) const
inline

Definition at line 68 of file EmuDuration.hh.

References EmuDuration().

◆ operator*=() [1/2]

EmuDuration& openmsx::EmuDuration::operator*= ( unsigned  fact)
inline

Definition at line 93 of file EmuDuration.hh.

◆ operator*=() [2/2]

EmuDuration& openmsx::EmuDuration::operator*= ( double  fact)
inline

Definition at line 95 of file EmuDuration.hh.

◆ operator+()

EmuDuration openmsx::EmuDuration::operator+ ( EmuDuration::param  d) const
inline

Definition at line 66 of file EmuDuration.hh.

References EmuDuration().

◆ operator/() [1/2]

EmuDuration openmsx::EmuDuration::operator/ ( unsigned  fact) const
inline

Definition at line 70 of file EmuDuration.hh.

References EmuDuration().

◆ operator/() [2/2]

unsigned openmsx::EmuDuration::operator/ ( EmuDuration::param  d) const
inline

Definition at line 74 of file EmuDuration.hh.

◆ operator/=()

EmuDuration& openmsx::EmuDuration::operator/= ( double  fact)
inline

Definition at line 97 of file EmuDuration.hh.

◆ operator<()

bool openmsx::EmuDuration::operator< ( EmuDuration::param  d) const
inline

Definition at line 54 of file EmuDuration.hh.

◆ operator<=()

bool openmsx::EmuDuration::operator<= ( EmuDuration::param  d) const
inline

Definition at line 56 of file EmuDuration.hh.

◆ operator==()

bool openmsx::EmuDuration::operator== ( EmuDuration::param  d) const
inline

Definition at line 50 of file EmuDuration.hh.

◆ operator>()

bool openmsx::EmuDuration::operator> ( EmuDuration::param  d) const
inline

Definition at line 58 of file EmuDuration.hh.

◆ operator>=()

bool openmsx::EmuDuration::operator>= ( EmuDuration::param  d) const
inline

Definition at line 60 of file EmuDuration.hh.

◆ sec()

static EmuDuration openmsx::EmuDuration::sec ( unsigned  x)
inlinestatic

◆ serialize()

template<typename Archive >
void openmsx::EmuDuration::serialize ( Archive &  ar,
unsigned  version 
)

Definition at line 11 of file EmuDuration.cc.

Referenced by getTicksAt().

◆ toDouble()

double openmsx::EmuDuration::toDouble ( ) const
inline

◆ usec()

static EmuDuration openmsx::EmuDuration::usec ( unsigned  x)
inlinestatic

Friends And Related Function Documentation

◆ EmuTime

friend class EmuTime
friend

Definition at line 28 of file EmuDuration.hh.

Member Data Documentation

◆ infinity

const EmuDuration openmsx::EmuDuration::infinity
static

◆ zero

const EmuDuration openmsx::EmuDuration::zero
static

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