Squashed commit of the following:
commit
7752bae1299569b97989ed65f4867d64172620b5
Author: Russ Combs <rucombs@cisco.com>
Date: Mon Dec 19 18:53:55 2016 -0500
do not build tsc clock scaling if not enabled
(don't break non-x86 builds)
#include <chrono>
using hr_clock = std::chrono::high_resolution_clock;
using SnortClock = hr_clock;
-inline long clock_scale() { return 1.0; }
+inline long clock_scale() { return 1; }
#endif
using hr_duration = SnortClock::duration;
// tsc_clock.cc author Russ Combs <rucombs@cisco.com>
#include "tsc_clock.h"
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <time.h>
long clock_scale()
{
+#ifndef USE_TSC_CLOCK
+ return 1;
+#else
static long tpus = 0; // ticks / usec
if ( !tpus )
tpus = (long)((end - start)/1e6);
}
return tpus;
+#endif
}