Cap max wait to 1 day
This one slipped away in my commit from earlier
This commit is contained in:
parent
b06456e4b0
commit
f426e3570d
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ namespace {
|
|||
auto now = std::chrono::system_clock::now();
|
||||
auto next_time = db.next_access_time(op);
|
||||
duration<double> diff = duration_cast<seconds>(next_time.ts - now);
|
||||
const auto retval = std::max(min_wait, diff.count());
|
||||
const auto retval = std::max(min_wait, std::min(3600.0 * 24.0, diff.count()));
|
||||
return retval;
|
||||
}
|
||||
} //unnamed namespace
|
||||
|
|
Loading…
Reference in a new issue