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 16 of file EmuDuration.hh.

Member Typedef Documentation

◆ param

Definition at line 25 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 33 of file EmuDuration.hh.

◆ EmuDuration() [3/3]

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

Definition at line 34 of file EmuDuration.hh.

Member Function Documentation

◆ div()

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

Definition at line 91 of file EmuDuration.hh.

◆ divRoundUp()

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

Definition at line 73 of file EmuDuration.hh.

References EmuDuration().

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

◆ divUp()

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

Definition at line 84 of file EmuDuration.hh.

◆ getTicksAt()

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

Definition at line 103 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 48 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 53 of file EmuDuration.hh.

◆ operator%()

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

Definition at line 65 of file EmuDuration.hh.

References EmuDuration().

◆ operator*()

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

Definition at line 69 of file EmuDuration.hh.

References EmuDuration().

◆ operator*=() [1/2]

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

Definition at line 94 of file EmuDuration.hh.

◆ operator*=() [2/2]

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

Definition at line 96 of file EmuDuration.hh.

◆ operator+()

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

Definition at line 67 of file EmuDuration.hh.

References EmuDuration().

◆ operator/() [1/2]

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

Definition at line 71 of file EmuDuration.hh.

References EmuDuration().

◆ operator/() [2/2]

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

Definition at line 75 of file EmuDuration.hh.

◆ operator/=()

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

Definition at line 98 of file EmuDuration.hh.

◆ operator<()

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

Definition at line 55 of file EmuDuration.hh.

◆ operator<=()

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

Definition at line 57 of file EmuDuration.hh.

◆ operator==()

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

Definition at line 51 of file EmuDuration.hh.

◆ operator>()

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

Definition at line 59 of file EmuDuration.hh.

◆ operator>=()

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

Definition at line 61 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 10 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 29 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: