3 bool Timestamp::operator<(const Timestamp
&other
) const {
4 return internal_time
< other
.internal_time
;
7 bool Timestamp::operator>(const Timestamp
&other
) const {
8 return internal_time
> other
.internal_time
;
11 bool Timestamp::operator==(const Timestamp
&other
) const {
12 return internal_time
== other
.internal_time
;
15 Timestamp
&Timestamp::operator=(const Timestamp
&other
) {
16 internal_time
= other
.internal_time
;
20 qint64
Timestamp::seconds_until(const Timestamp
& other
) const {
21 return internal_time
.secsTo(other
.internal_time
);
24 qint64
Timestamp::ms_until(const Timestamp
& other
) const {
25 qint64 seconds
= seconds_until(other
);
26 QTime t
= internal_time
.time();
27 QTime t2
= other
.internal_time
.time();
30 if(t
< t2
) return t
.msecsTo(t2
);
31 else qCritical("NOTE: comparision between different-day QTimes NYI!");
34 if(t
> t2
) return t
.msecsTo(t2
);
35 else qCritical("NOTE: comparision between different-day QTimes NYI!");