openMSX
Public Attributes | List of all members
openmsx::DynamicClock::IntegralFractional Struct Reference

Like getTicksTill(), but also returns the fractional part (in range [0, 1)). More...

#include <DynamicClock.hh>

Public Attributes

unsigned integral
 
float fractional
 

Detailed Description

Like getTicksTill(), but also returns the fractional part (in range [0, 1)).

This is equivalent to, but numerically more stable than: EmuDuration dur = e - this->getTime(); double d = dur / this->getPeriod(); int i = int(d); double frac = d - i; return {i, frac};

Definition at line 64 of file DynamicClock.hh.

Member Data Documentation

◆ fractional

float openmsx::DynamicClock::IntegralFractional::fractional

Definition at line 66 of file DynamicClock.hh.

◆ integral

unsigned openmsx::DynamicClock::IntegralFractional::integral

Definition at line 65 of file DynamicClock.hh.


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