diff --git a/panda/src/express/config_express.cxx b/panda/src/express/config_express.cxx index f5e0bd9c54..ade94b0da2 100644 --- a/panda/src/express/config_express.cxx +++ b/panda/src/express/config_express.cxx @@ -192,8 +192,7 @@ get_paranoid_clock() { paranoid_clock = new ConfigVariableBool ("paranoid-clock", false, PRC_DESC("Set this to true to double-check the results of the high-resolution " - "clock against the system clock. This has no effect if NDEBUG is " - "defined.")); + "clock against the system clock.")); } return *paranoid_clock; diff --git a/panda/src/express/trueClock.I b/panda/src/express/trueClock.I index 21b734aa62..c93ee6f7e0 100644 --- a/panda/src/express/trueClock.I +++ b/panda/src/express/trueClock.I @@ -26,15 +26,15 @@ //////////////////////////////////////////////////////////////////// INLINE double TrueClock:: get_short_time() { - bool paranoid_clock = _paranoid_clock; + bool is_paranoid_clock = get_paranoid_clock(); - if (paranoid_clock) { + if (is_paranoid_clock) { _lock.lock(); } double time = get_short_raw_time(); - if (paranoid_clock) { + if (is_paranoid_clock) { // Check for rollforwards, rollbacks, and compensate for Speed // Gear type programs by verifying against the time of day clock. time = correct_time(time); diff --git a/panda/src/express/trueClock.cxx b/panda/src/express/trueClock.cxx index 735f7c92e7..3ef225edd6 100644 --- a/panda/src/express/trueClock.cxx +++ b/panda/src/express/trueClock.cxx @@ -180,23 +180,16 @@ TrueClock() { // the above clocks if paranoid-clock is enabled. GetSystemTimeAsFileTime((FILETIME *)&_init_tod); - _paranoid_clock = get_paranoid_clock(); _chase_clock = CC_keep_even; - if (_paranoid_clock) { - // If we'll be cross-checking the clock, we'd better start out - // with at least one timestamp, so we'll know if the clock jumps - // just after startup. - _timestamps.push_back(Timestamp(0.0, 0.0)); - } + // In case we'll be cross-checking the clock, we'd better start out + // with at least one timestamp, so we'll know if the clock jumps + // just after startup. + _timestamps.push_back(Timestamp(0.0, 0.0)); if (!_has_high_res) { clock_cat.warning() << "No high resolution clock available." << endl; - - } else if (_paranoid_clock) { - clock_cat.info() - << "Not trusting the high resolution clock." << endl; } } diff --git a/panda/src/express/trueClock.h b/panda/src/express/trueClock.h index b4574ba83f..59c9d70533 100644 --- a/panda/src/express/trueClock.h +++ b/panda/src/express/trueClock.h @@ -23,6 +23,7 @@ #include "typedef.h" #include "pdeque.h" #include "mutexImpl.h" +#include "config_express.h" //////////////////////////////////////////////////////////////////// // Class : TrueClock @@ -79,8 +80,6 @@ protected: int _init_tc; PN_uint64 _init_tod; - bool _paranoid_clock; - // The rest of the data structures in this block are strictly for // implementing paranoid_clock: they are designed to allow us to // cross-check the high-resolution clock against the time-of-day