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

◆ EmuDuration() [2/3]

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

Definition at line 35 of file EmuDuration.hh.

◆ EmuDuration() [3/3]

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

Definition at line 36 of file EmuDuration.hh.

Member Function Documentation

◆ div()

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

Definition at line 93 of file EmuDuration.hh.

◆ divRoundUp()

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

Definition at line 75 of file EmuDuration.hh.

References EmuDuration().

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

◆ divUp()

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

Definition at line 86 of file EmuDuration.hh.

◆ getTicksAt()

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

Definition at line 105 of file EmuDuration.hh.

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

◆ hz()

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

◆ infinity()

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

Definition at line 120 of file EmuDuration.hh.

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

Referenced by openmsx::AviRecorder::addImage(), and openmsx::AviRecorder::~AviRecorder().

◆ length()

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

◆ msec()

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

◆ operator!=()

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

Definition at line 55 of file EmuDuration.hh.

◆ operator%()

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

Definition at line 67 of file EmuDuration.hh.

◆ operator*()

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

Definition at line 71 of file EmuDuration.hh.

References EmuDuration().

◆ operator*=() [1/2]

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

Definition at line 96 of file EmuDuration.hh.

◆ operator*=() [2/2]

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

Definition at line 98 of file EmuDuration.hh.

◆ operator+()

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

Definition at line 69 of file EmuDuration.hh.

◆ operator/() [1/2]

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

Definition at line 73 of file EmuDuration.hh.

References EmuDuration().

◆ operator/() [2/2]

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

Definition at line 77 of file EmuDuration.hh.

◆ operator/=()

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

Definition at line 100 of file EmuDuration.hh.

◆ operator<()

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

Definition at line 57 of file EmuDuration.hh.

◆ operator<=()

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

Definition at line 59 of file EmuDuration.hh.

◆ operator==()

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

Definition at line 53 of file EmuDuration.hh.

◆ operator>()

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

Definition at line 61 of file EmuDuration.hh.

◆ operator>=()

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

Definition at line 63 of file EmuDuration.hh.

◆ sec()

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

◆ 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
inline

◆ usec()

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

◆ zero()

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

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: