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

#include <EmuDuration.hh>

Public Types

using param = const EmuDuration &
 

Public Member Functions

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

Static Public Member Functions

static constexpr EmuDuration sec (unsigned x)
 
static constexpr EmuDuration msec (unsigned x)
 
static constexpr EmuDuration usec (unsigned x)
 
static constexpr EmuDuration hz (unsigned x)
 
static constexpr EmuDuration zero ()
 
static constexpr EmuDuration infinity ()
 

Friends

class EmuTime
 

Detailed Description

Definition at line 18 of file EmuDuration.hh.

Member Typedef Documentation

◆ param

Definition at line 27 of file EmuDuration.hh.

Constructor & Destructor Documentation

◆ EmuDuration() [1/3]

constexpr openmsx::EmuDuration::EmuDuration ( )
constexprdefault

◆ EmuDuration() [2/3]

constexpr openmsx::EmuDuration::EmuDuration ( uint64_t  n)
inlineexplicitconstexpr

Definition at line 35 of file EmuDuration.hh.

◆ EmuDuration() [3/3]

constexpr openmsx::EmuDuration::EmuDuration ( double  duration)
inlineexplicitconstexpr

Definition at line 36 of file EmuDuration.hh.

Member Function Documentation

◆ div()

constexpr double openmsx::EmuDuration::div ( EmuDuration::param  d) const
inlineconstexpr

Definition at line 93 of file EmuDuration.hh.

◆ divRoundUp()

constexpr EmuDuration openmsx::EmuDuration::divRoundUp ( unsigned  fact) const
inlineconstexpr

Definition at line 75 of file EmuDuration.hh.

References EmuDuration().

◆ divUp()

constexpr unsigned openmsx::EmuDuration::divUp ( EmuDuration::param  d) const
inlineconstexpr

Definition at line 86 of file EmuDuration.hh.

◆ getTicksAt()

constexpr unsigned openmsx::EmuDuration::getTicksAt ( unsigned  freq) const
inlineconstexpr

Definition at line 105 of file EmuDuration.hh.

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

◆ hz()

static constexpr EmuDuration openmsx::EmuDuration::hz ( unsigned  x)
inlinestaticconstexpr

◆ infinity()

static constexpr EmuDuration openmsx::EmuDuration::infinity ( )
inlinestaticconstexpr

Definition at line 120 of file EmuDuration.hh.

References EmuDuration(), and gl::max().

Referenced by openmsx::AviRecorder::addImage().

◆ length()

constexpr uint64_t openmsx::EmuDuration::length ( ) const
inlineconstexpr

◆ msec()

static constexpr EmuDuration openmsx::EmuDuration::msec ( unsigned  x)
inlinestaticconstexpr

Definition at line 41 of file EmuDuration.hh.

References EmuDuration(), openmsx::MAIN_FREQ, and openmsx::x.

Referenced by openmsx::MSXFDC::MSXFDC().

◆ operator!=()

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

Definition at line 55 of file EmuDuration.hh.

◆ operator%()

constexpr EmuDuration openmsx::EmuDuration::operator% ( EmuDuration::param  d) const
inlineconstexpr

Definition at line 67 of file EmuDuration.hh.

◆ operator*()

constexpr EmuDuration openmsx::EmuDuration::operator* ( unsigned  fact) const
inlineconstexpr

Definition at line 71 of file EmuDuration.hh.

References EmuDuration().

◆ operator*=() [1/2]

constexpr EmuDuration& openmsx::EmuDuration::operator*= ( double  fact)
inlineconstexpr

Definition at line 98 of file EmuDuration.hh.

◆ operator*=() [2/2]

constexpr EmuDuration& openmsx::EmuDuration::operator*= ( unsigned  fact)
inlineconstexpr

Definition at line 96 of file EmuDuration.hh.

◆ operator+()

constexpr EmuDuration openmsx::EmuDuration::operator+ ( EmuDuration::param  d) const
inlineconstexpr

Definition at line 69 of file EmuDuration.hh.

◆ operator/() [1/2]

constexpr unsigned openmsx::EmuDuration::operator/ ( EmuDuration::param  d) const
inlineconstexpr

Definition at line 77 of file EmuDuration.hh.

◆ operator/() [2/2]

constexpr EmuDuration openmsx::EmuDuration::operator/ ( unsigned  fact) const
inlineconstexpr

Definition at line 73 of file EmuDuration.hh.

References EmuDuration().

◆ operator/=()

constexpr EmuDuration& openmsx::EmuDuration::operator/= ( double  fact)
inlineconstexpr

Definition at line 100 of file EmuDuration.hh.

◆ operator<()

constexpr bool openmsx::EmuDuration::operator< ( EmuDuration::param  d) const
inlineconstexpr

Definition at line 57 of file EmuDuration.hh.

◆ operator<=()

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

Definition at line 59 of file EmuDuration.hh.

◆ operator==()

constexpr bool openmsx::EmuDuration::operator== ( EmuDuration::param  d) const
inlineconstexpr

Definition at line 53 of file EmuDuration.hh.

◆ operator>()

constexpr bool openmsx::EmuDuration::operator> ( EmuDuration::param  d) const
inlineconstexpr

Definition at line 61 of file EmuDuration.hh.

◆ operator>=()

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

Definition at line 63 of file EmuDuration.hh.

◆ sec()

static constexpr EmuDuration openmsx::EmuDuration::sec ( unsigned  x)
inlinestaticconstexpr

◆ serialize()

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

Definition at line 126 of file EmuDuration.hh.

◆ toDouble()

constexpr double openmsx::EmuDuration::toDouble ( ) const
inlineconstexpr

Definition at line 49 of file EmuDuration.hh.

References openmsx::MAIN_FREQ32.

Referenced by openmsx::AviRecorder::addImage().

◆ usec()

static constexpr EmuDuration openmsx::EmuDuration::usec ( unsigned  x)
inlinestaticconstexpr

Definition at line 43 of file EmuDuration.hh.

References EmuDuration(), openmsx::MAIN_FREQ, and openmsx::x.

◆ zero()

static constexpr EmuDuration openmsx::EmuDuration::zero ( )
inlinestaticconstexpr

Friends And Related Function Documentation

◆ EmuTime

friend class EmuTime
friend

Definition at line 31 of file EmuDuration.hh.


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