13
0

fix timepos_t::max and timecnt_t::max to avoid int62_t flag bit

Both should likely just re-use int62_t::max
This commit is contained in:
Paul Davis 2020-11-29 12:51:51 -07:00
parent ae01dafcce
commit baaa8f36ca

View File

@ -450,14 +450,14 @@ struct numeric_limits<Temporal::timepos_t> {
return Temporal::timepos_t::from_superclock (0);
}
static Temporal::timepos_t max() {
return Temporal::timepos_t::from_superclock (4611686018427387904); /* pow (2,62) */
return Temporal::timepos_t::from_superclock (4611686018427387903); /* pow (2,62) - 1 */
}
};
template<>
struct numeric_limits<Temporal::timecnt_t> {
static Temporal::timecnt_t min() { return Temporal::timecnt_t::from_superclock (0); }
static Temporal::timecnt_t max() { return Temporal::timecnt_t::from_superclock (4611686018427387904); /* pow (2,62) */ }
static Temporal::timecnt_t max() { return Temporal::timecnt_t::from_superclock (4611686018427387903); /* pow (2,62) - 1 */ }
};
}