示例#1
0
/*PLONK_INLINE_LOW*/ bool TimeStamp::operator>= (TimeStamp const& other) const throw()
{
    plonk_assert (fractionIsValid (this->fraction));
    plonk_assert (fractionIsValid (other.fraction));
    
    if (this->isInfinite())
    {
        if (other.isInfinite())
            return false;
        else
            return true;
    }
    else return ((time > other.time) || ((time == other.time) && (fraction >= other.fraction)));
}
示例#2
0
TimeStamp TimeStamp::operator+ (TimeStamp const& other) const throw()
{
    if (this->isInfinite())
    {
        return *this;
    }
    else if (other.isInfinite())
    {
        return other;
    }
    else
    {
        TimeStamp result (this->time + other.time, this->fraction);
        result += other.fraction;
        return result;
    }
}
示例#3
0
bool TimeStamp::operator> (TimeStamp const& other) const throw()
{
    plonk_assert (fractionIsValid (this->fraction));
    plonk_assert (fractionIsValid (other.fraction));
    
    if (this->isInfinite())
    {
        if (other.isInfinite())
            return false;
        else
            return true;
    }
    else if (time > other.time)
        return true;
    else if ((time == other.time) && (fraction > other.fraction))
        return true;
    else
        return false;    
}