From 762e5fd09303b7755abe1eb29b3b7146dc9aa02a Mon Sep 17 00:00:00 2001 From: Martin Nowack Date: Wed, 23 Nov 2016 16:38:21 +0100 Subject: [PATCH] Do not request time stamp if not needed If no timeout is needed for solving queries, time stamps do not need to be acquired. --- src/util/timer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/timer.h b/src/util/timer.h index cc082a9d8..b4a69f8bf 100644 --- a/src/util/timer.h +++ b/src/util/timer.h @@ -31,8 +31,8 @@ public: ~timer(); void start(); double get_seconds(); - bool timeout(unsigned secs) { return secs > 0 && get_seconds() > secs; } - bool ms_timeout(unsigned ms) { return ms > 0 && get_seconds() * 1000 > ms; } + bool timeout(unsigned secs) { return secs > 0 && secs != UINT_MAX && get_seconds() > secs; } + bool ms_timeout(unsigned ms) { return ms > 0 && ms != UINT_MAX && get_seconds() * 1000 > ms; } }; #endif /* TIMER_H_ */