diff options
Diffstat (limited to 'lib/Core/Searcher.cpp')
-rw-r--r-- | lib/Core/Searcher.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Core/Searcher.cpp b/lib/Core/Searcher.cpp index db295468..47457a91 100644 --- a/lib/Core/Searcher.cpp +++ b/lib/Core/Searcher.cpp @@ -351,9 +351,11 @@ BatchingSearcher::~BatchingSearcher() { } ExecutionState &BatchingSearcher::selectState() { - if (!lastState || - (time::getWallTime() - lastStartTime) > timeBudget || - (stats::instructions - lastStartInstructions) > instructionBudget) { + if (!lastState || + (((timeBudget.toSeconds() > 0) && + (time::getWallTime() - lastStartTime) > timeBudget)) || + ((instructionBudget > 0) && + (stats::instructions - lastStartInstructions) > instructionBudget)) { if (lastState) { time::Span delta = time::getWallTime() - lastStartTime; auto t = timeBudget; |