3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 10:25:18 +00:00

fix compiler warning in scoped_timer.cpp on linux

2 secs in nanosec representation still fit in 31 bits, so no need for ULL

Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
This commit is contained in:
Nuno Lopes 2015-12-08 17:03:18 +00:00
parent ea79d0eacd
commit 4b0f2cae0d

View file

@ -112,9 +112,9 @@ struct scoped_timer::imp {
end_time.tv_sec += st->m_ms / 1000u;
end_time.tv_nsec += (st->m_ms % 1000u) * 1000000ull;
// check for overflow
if (end_time.tv_nsec >= 1000000000ull) {
if (end_time.tv_nsec >= 1000000000) {
++end_time.tv_sec;
end_time.tv_nsec -= 1000000000ull;
end_time.tv_nsec -= 1000000000;
}
pthread_mutex_lock(&st->m_mutex);