finished Time tests and fixed a corner case bug
diff --git a/aos/common/time.cc b/aos/common/time.cc
index aa75eae..1c86811 100644
--- a/aos/common/time.cc
+++ b/aos/common/time.cc
@@ -142,8 +142,8 @@
 }
 Time &Time::operator%=(int32_t rhs) {
   nsec_ = ToNSec() % rhs;
-  const int wraps = nsec_ / kNSecInSec;
-  sec_ = wraps;
+  const int wraps = nsec_ / ((rhs / kNSecInSec + 1) * kNSecInSec);
+  sec_ = wraps + rhs / kNSecInSec;
   nsec_ -= kNSecInSec * wraps;
   if (nsec_ < 0) {
     nsec_ += kNSecInSec;