fix issue4 with timer

This commit is contained in:
lperron@google.com
2010-10-10 00:23:55 +00:00
parent f45004c1e4
commit 13ca997af1
2 changed files with 2 additions and 0 deletions

View File

@@ -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() {

View File

@@ -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) {