fix issue4 with timer
This commit is contained in:
@@ -1203,6 +1203,7 @@ Solver::Solver(const string& name)
|
||||
InitCachedIntConstants(); // to be called after the SENTINEL is set.
|
||||
InitCachedConstraint(); // Cache the true constraint.
|
||||
InitBoolVarCaches();
|
||||
timer_->Restart();
|
||||
}
|
||||
|
||||
Solver::~Solver() {
|
||||
|
||||
@@ -3213,6 +3213,7 @@ bool RegularLimit::CheckTime() {
|
||||
if (wall_time_ != kint64max && next_check_ <= check_count_) {
|
||||
Solver* const s = solver();
|
||||
int64 time_delta = s->wall_time() - wall_time_offset_;
|
||||
LOG(INFO) << "time delta = " << time_delta;
|
||||
if (smart_time_check_
|
||||
&& check_count_ > kCheckWarmupIterations
|
||||
&& time_delta > 0) {
|
||||
|
||||
Reference in New Issue
Block a user