add operator<, -, -=

This commit is contained in:
Glenn Maynard
2006-09-08 04:08:05 +00:00
parent d93a57c841
commit 99f9d8d33c
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -105,6 +105,13 @@ float RageTimer::operator-(const RageTimer &rhs) const
return Difference(*this, rhs);
}
bool RageTimer::operator<( const RageTimer &rhs ) const
{
if( m_secs != rhs.m_secs ) return m_secs < rhs.m_secs;
return m_us < rhs.m_us;
}
RageTimer RageTimer::Sum(const RageTimer &lhs, float tm)
{
/* tm == 5.25 -> secs = 5, us = 5.25 - ( 5) = .25