express: Protect clock debug print with is_debug() check

This commit is contained in:
rdb 2021-08-30 14:00:59 +02:00
parent 8ad4234df8
commit 32b78a382a

View File

@ -243,10 +243,12 @@ correct_time(double time) {
// backward in the high-precision clock, since this does appear to happen
// in a threaded environment.
clock_cat.debug()
<< "Clock error detected; elapsed time " << time_delta
<< "s on high-resolution counter, and " << tod_delta
<< "s on time-of-day clock.\n";
if (clock_cat.is_debug()) {
clock_cat.debug()
<< "Clock error detected; elapsed time " << time_delta
<< "s on high-resolution counter, and " << tod_delta
<< "s on time-of-day clock.\n";
}
++_error_count;
// If both are negative, we call it 0. If one is negative, we trust the