commit | 2e0dcfd17374843d217512a03f9b475d8c8e9eea | [log] [tgz] |
---|---|---|
author | Brian Silverman <brians> | Sat Mar 30 22:44:40 2013 -0700 |
committer | Brian Silverman <brians> | Sat Mar 30 22:44:40 2013 -0700 |
tree | 762f6718b612f2b0601a907c4c0fcc94ab366b81 | |
parent | 061308713665a2d424f516a9cb725d753249a87e [diff] [blame] |
got it so that reading usb packets reliably works "sometimes"
diff --git a/aos/common/time.cc b/aos/common/time.cc index 995011a..75ea196 100644 --- a/aos/common/time.cc +++ b/aos/common/time.cc
@@ -120,6 +120,9 @@ const Time Time::operator/(int32_t rhs) const { return Time(*this) /= rhs; } +double Time::operator/(const Time &rhs) const { + return ToSeconds() / rhs.ToSeconds(); +} Time &Time::operator%=(int32_t rhs) { nsec_ = ToNSec() % rhs; const int wraps = nsec_ / kNSecInSec;