Cap max wait to 1 day

This one slipped away in my commit from earlier
This commit is contained in:
King_DuckZ 2020-08-16 12:58:07 +01:00
parent b06456e4b0
commit f426e3570d

View file

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