PeekDeltaTime() -> Ago()
Remove a useless alias.
This commit is contained in:
+1
-1
@@ -135,7 +135,7 @@ void RageDisplay::ProcessStatsOnFlip()
|
|||||||
g_iFramesRenderedSinceLastCheck++;
|
g_iFramesRenderedSinceLastCheck++;
|
||||||
g_iFramesRenderedSinceLastReset++;
|
g_iFramesRenderedSinceLastReset++;
|
||||||
|
|
||||||
if( g_LastCheckTimer.PeekDeltaTime() >= 1.0f ) // update stats every 1 sec.
|
if( g_LastCheckTimer.Ago() >= 1.0f ) // update stats every 1 sec.
|
||||||
{
|
{
|
||||||
float fActualTime = g_LastCheckTimer.GetDeltaTime();
|
float fActualTime = g_LastCheckTimer.GetDeltaTime();
|
||||||
g_iNumChecksSinceLastReset++;
|
g_iNumChecksSinceLastReset++;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ int64_t pos_map_queue::Search( int64_t iSourceFrame ) const
|
|||||||
* 3. Underflow; we'll be given a larger frame number than we know about.
|
* 3. Underflow; we'll be given a larger frame number than we know about.
|
||||||
*/
|
*/
|
||||||
static RageTimer last;
|
static RageTimer last;
|
||||||
if( last.PeekDeltaTime() >= 1.0f )
|
if( last.Ago() >= 1.0f )
|
||||||
{
|
{
|
||||||
last.Touch();
|
last.Touch();
|
||||||
LOG->Trace("Audio frame (%" PRId64 ") was out of range of the data sent - possible buffer underflow? This is not always an error, however if you see it frequently there could be sound buffer problems.", iSourceFrame);
|
LOG->Trace("Audio frame (%" PRId64 ") was out of range of the data sent - possible buffer underflow? This is not always an error, however if you see it frequently there could be sound buffer problems.", iSourceFrame);
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ public:
|
|||||||
|
|
||||||
/* Time between last call to GetDeltaTime() (Ago() + Touch()): */
|
/* Time between last call to GetDeltaTime() (Ago() + Touch()): */
|
||||||
float GetDeltaTime();
|
float GetDeltaTime();
|
||||||
/* (alias) */
|
|
||||||
float PeekDeltaTime() const { return Ago(); }
|
|
||||||
|
|
||||||
static double GetTimeSinceStart(); // seconds since the program was started
|
static double GetTimeSinceStart(); // seconds since the program was started
|
||||||
static double GetTimeSinceStartFast() { return GetTimeSinceStart(); }
|
static double GetTimeSinceStartFast() { return GetTimeSinceStart(); }
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ FileSet *FilenameDB::GetFileSet( const RString &sDir_, bool bCreate )
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ExpireSeconds == -1 || pFileSet->age.PeekDeltaTime() < ExpireSeconds )
|
if( ExpireSeconds == -1 || pFileSet->age.Ago() < ExpireSeconds )
|
||||||
{
|
{
|
||||||
/* Found it, and it hasn't expired. */
|
/* Found it, and it hasn't expired. */
|
||||||
return pFileSet;
|
return pFileSet;
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ void ScreenMapControllers::Update( float fDeltaTime )
|
|||||||
|
|
||||||
if( !m_WaitingForPress.IsZero() && m_DeviceIToMap.IsValid() ) // we're going to map an input
|
if( !m_WaitingForPress.IsZero() && m_DeviceIToMap.IsValid() ) // we're going to map an input
|
||||||
{
|
{
|
||||||
if( m_WaitingForPress.PeekDeltaTime() < g_fSecondsToWaitForInput )
|
if( m_WaitingForPress.Ago() < g_fSecondsToWaitForInput )
|
||||||
return; /* keep waiting */
|
return; /* keep waiting */
|
||||||
m_WaitingForPress.SetZero();
|
m_WaitingForPress.SetZero();
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public:
|
|||||||
{
|
{
|
||||||
/* We load songs much faster than we draw frames. Cap the draw rate,
|
/* We load songs much faster than we draw frames. Cap the draw rate,
|
||||||
* so we don't slow down the reload. */
|
* so we don't slow down the reload. */
|
||||||
if( m_LastDraw.PeekDeltaTime() < 1.0f/DrawFrameRate )
|
if( m_LastDraw.Ago() < 1.0f/DrawFrameRate )
|
||||||
return;
|
return;
|
||||||
m_LastDraw.GetDeltaTime();
|
m_LastDraw.GetDeltaTime();
|
||||||
|
|
||||||
|
|||||||
@@ -121,13 +121,13 @@ void ScreenSelect::Update( float fDelta )
|
|||||||
{
|
{
|
||||||
if( !IsTransitioning() )
|
if( !IsTransitioning() )
|
||||||
{
|
{
|
||||||
if( IDLE_COMMENT_SECONDS > 0 && m_timerIdleComment.PeekDeltaTime() >= IDLE_COMMENT_SECONDS )
|
if( IDLE_COMMENT_SECONDS > 0 && m_timerIdleComment.Ago() >= IDLE_COMMENT_SECONDS )
|
||||||
{
|
{
|
||||||
SOUND->PlayOnceFromAnnouncer( m_sName+" IdleComment" );
|
SOUND->PlayOnceFromAnnouncer( m_sName+" IdleComment" );
|
||||||
m_timerIdleComment.GetDeltaTime();
|
m_timerIdleComment.GetDeltaTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( IDLE_TIMEOUT_SECONDS > 0 && m_timerIdleTimeout.PeekDeltaTime() >= IDLE_TIMEOUT_SECONDS )
|
if( IDLE_TIMEOUT_SECONDS > 0 && m_timerIdleTimeout.Ago() >= IDLE_TIMEOUT_SECONDS )
|
||||||
{
|
{
|
||||||
SCREENMAN->SetNewScreen( IDLE_TIMEOUT_SCREEN );
|
SCREENMAN->SetNewScreen( IDLE_TIMEOUT_SCREEN );
|
||||||
m_timerIdleTimeout.GetDeltaTime();
|
m_timerIdleTimeout.GetDeltaTime();
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ void ScreenSelectMusic::Update( float fDeltaTime )
|
|||||||
{
|
{
|
||||||
if( !IsTransitioning() )
|
if( !IsTransitioning() )
|
||||||
{
|
{
|
||||||
if( IDLE_COMMENT_SECONDS > 0 && m_timerIdleComment.PeekDeltaTime() >= IDLE_COMMENT_SECONDS )
|
if( IDLE_COMMENT_SECONDS > 0 && m_timerIdleComment.Ago() >= IDLE_COMMENT_SECONDS )
|
||||||
{
|
{
|
||||||
SOUND->PlayOnceFromAnnouncer( m_sName+" IdleComment" );
|
SOUND->PlayOnceFromAnnouncer( m_sName+" IdleComment" );
|
||||||
m_timerIdleComment.GetDeltaTime();
|
m_timerIdleComment.GetDeltaTime();
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ void ScreenTextEntry::Update( float fDelta )
|
|||||||
{
|
{
|
||||||
ScreenWithMenuElements::Update( fDelta );
|
ScreenWithMenuElements::Update( fDelta );
|
||||||
|
|
||||||
if( m_timerToggleCursor.PeekDeltaTime() > 0.25f )
|
if( m_timerToggleCursor.Ago() > 0.25f )
|
||||||
{
|
{
|
||||||
m_timerToggleCursor.Touch();
|
m_timerToggleCursor.Touch();
|
||||||
m_bShowAnswerCaret = !m_bShowAnswerCaret;
|
m_bShowAnswerCaret = !m_bShowAnswerCaret;
|
||||||
|
|||||||
+1
-1
@@ -231,7 +231,7 @@ void WheelBase::Update( float fDeltaTime )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if( PREFSMAN->m_iMusicWheelSwitchSpeed >= MAX_WHEEL_SOUND_SPEED &&
|
if( PREFSMAN->m_iMusicWheelSwitchSpeed >= MAX_WHEEL_SOUND_SPEED &&
|
||||||
m_MovingSoundTimer.PeekDeltaTime() >= 1.0f / MAX_WHEEL_SOUND_SPEED )
|
m_MovingSoundTimer.Ago() >= 1.0f / MAX_WHEEL_SOUND_SPEED )
|
||||||
{
|
{
|
||||||
m_MovingSoundTimer.GetDeltaTime();
|
m_MovingSoundTimer.GetDeltaTime();
|
||||||
m_soundChangeMusic.Play(true);
|
m_soundChangeMusic.Play(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user