Commit b61bcf63 authored by Robert Ricci's avatar Robert Ricci
Browse files

Add an > operator

parent baa96f86
......@@ -76,6 +76,12 @@ bool Time::operator<(Time const & right) const
< make_pair(right.data.tv_sec, right.data.tv_usec);
}
bool Time::operator>(Time const & right) const
{
return make_pair(data.tv_sec, data.tv_usec)
> make_pair(right.data.tv_sec, right.data.tv_usec);
}
bool Time::operator==(Time const & right) const
{
return make_pair(data.tv_sec, data.tv_usec)
......
......@@ -15,6 +15,7 @@ public:
Time operator+(int const & right) const;
Time operator-(Time const & right) const;
bool operator<(Time const & right) const;
bool operator>(Time const & right) const;
bool operator==(Time const & right) const;
bool operator!=(Time const & right) const;
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment