It seems that there are 60 minutes in each hour.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
#include "pg_scrubber.h"
+using namespace ::std::chrono;
+using namespace ::std::chrono_literals;
using namespace ::std::literals;
// ////////////////////////////////////////////////////////////////////////// //
std::optional<double> ScrubQueue::update_load_average()
{
int hb_interval = conf()->osd_heartbeat_interval;
- int n_samples = 60 * 24 * 24;
+ int n_samples = std::chrono::duration_cast<seconds>(24h).count();
if (hb_interval > 1) {
n_samples /= hb_interval;
if (n_samples < 1)