+ bool operator< (Time<S, O> const & o) const {
+ return _t < o._t;
+ }
+
+ bool operator<= (Time<S, O> const & o) const {
+ return _t <= o._t;
+ }
+
+ bool operator== (Time<S, O> const & o) const {
+ return _t == o._t;
+ }
+
+ bool operator!= (Time<S, O> const & o) const {
+ return _t != o._t;
+ }
+
+ bool operator>= (Time<S, O> const & o) const {
+ return _t >= o._t;
+ }
+
+ bool operator> (Time<S, O> const & o) const {
+ return _t > o._t;
+ }
+
+ Time<S, O> operator+ (Time<S, O> const & o) const {
+ return Time<S, O> (_t + o._t);
+ }
+
+ Time<S, O> & operator+= (Time<S, O> const & o) {
+ _t += o._t;
+ return *this;
+ }
+
+ Time<S, O> operator- () const {
+ return Time<S, O> (-_t);
+ }
+
+ Time<S, O> operator- (Time<S, O> const & o) const {
+ return Time<S, O> (_t - o._t);
+ }
+
+ Time<S, O> & operator-= (Time<S, O> const & o) {
+ _t -= o._t;
+ return *this;
+ }
+
+ /** Round up to the nearest sampling interval
+ * at some sampling rate.
+ * @param r Sampling rate.
+ */
+ Time<S, O> round_up (float r) const {
+ Type const n = llrintf (HZ / r);
+ Type const a = _t + n - 1;
+ return Time<S, O> (a - (a % n));
+ }
+