From f3aedc55d988f4b4d1c4c3c80ac5e754831ca2ed Mon Sep 17 00:00:00 2001 From: Mads Kiilerich Date: Mon, 6 Jun 2022 00:45:07 +0200 Subject: [PATCH] temporal: fix superclock DEBUG_EARLY_SCTS_USE If DEBUG_EARLY_SCTS_USE somehow was set, compilation would fail because of includes inside a namespace. (Even without DEBUG_EARLY_SCTS_USE, any early use of superclock will probably fail clearly with division by zero. There is thus not much need for DEBUG_EARLY_SCTS_USE now.) --- libs/temporal/temporal/superclock.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/temporal/temporal/superclock.h b/libs/temporal/temporal/superclock.h index bbf7bc6f71..2e7b0d3694 100644 --- a/libs/temporal/temporal/superclock.h +++ b/libs/temporal/temporal/superclock.h @@ -25,6 +25,11 @@ #include "temporal/visibility.h" +#ifdef DEBUG_EARLY_SCTS_USE +#include +#include +#endif + namespace Temporal { typedef int64_t superclock_t; @@ -39,9 +44,6 @@ extern bool scts_set; #ifdef DEBUG_EARLY_SCTS_USE -#include -#include - static inline superclock_t superclock_ticks_per_second() { if (!scts_set) { raise (SIGUSR2); } return _superclock_ticks_per_second; } #else static inline superclock_t superclock_ticks_per_second() { return _superclock_ticks_per_second; }