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.)
This commit is contained in:
Mads Kiilerich 2022-06-06 00:45:07 +02:00 committed by Paul Davis
parent 91314b68a5
commit f3aedc55d9
1 changed files with 5 additions and 3 deletions

View File

@ -25,6 +25,11 @@
#include "temporal/visibility.h"
#ifdef DEBUG_EARLY_SCTS_USE
#include <cstdlib>
#include <csignal>
#endif
namespace Temporal {
typedef int64_t superclock_t;
@ -39,9 +44,6 @@ extern bool scts_set;
#ifdef DEBUG_EARLY_SCTS_USE
#include <cstdlib>
#include <csignal>
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; }