commit | 0079a9dfcf14341a4dcb6c5e6150ac2073f80547 | [log] [tgz] |
---|---|---|
author | Brian Silverman <brians> | Thu Oct 24 15:57:35 2013 -0700 |
committer | Brian Silverman <brians> | Thu Oct 24 15:57:35 2013 -0700 |
tree | 116fd5035dbdcde9382ab675fb5d3b5879e9921e | |
parent | d36b7d37043f97e0189dc7a0881ae9a0bd1cc7dd [diff] [blame] |
deleted float operator overloads and added unary operator- to Time
diff --git a/aos/common/time.cc b/aos/common/time.cc index 28e5cae..ced0c4d 100644 --- a/aos/common/time.cc +++ b/aos/common/time.cc
@@ -149,6 +149,10 @@ return Time(*this) %= rhs; } +const Time Time::operator-() const { + return Time(-sec_ - 1, kNSecInSec - nsec_); +} + bool Time::operator==(const Time &rhs) const { return sec_ == rhs.sec_ && nsec_ == rhs.nsec_; }