From 58f0b4a16a2b9520f5c390dfa8bf909ecdad66c8 Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 29 Oct 2020 12:50:02 +0000 Subject: [PATCH] TimeManager: expose the speed=up factor nicely --- src/Time/TimeManager.cxx | 4 ++++ src/Time/TimeManager.hxx | 1 + 2 files changed, 5 insertions(+) diff --git a/src/Time/TimeManager.cxx b/src/Time/TimeManager.cxx index 887ea65e5..856adbcf0 100644 --- a/src/Time/TimeManager.cxx +++ b/src/Time/TimeManager.cxx @@ -464,6 +464,10 @@ void TimeManager::setTimeOffset(const std::string& offset_type, long int offset) << _warp->getIntValue() ); } +double TimeManager::getSimSpeedUpFactor() const +{ + return _simTimeFactor->getDoubleValue(); +} // Register the subsystem. SGSubsystemMgr::Registrant registrantTimeManager( diff --git a/src/Time/TimeManager.hxx b/src/Time/TimeManager.hxx index 677590232..c8dfc58d2 100644 --- a/src/Time/TimeManager.hxx +++ b/src/Time/TimeManager.hxx @@ -55,6 +55,7 @@ public: inline double getMPProtocolClockSec() const { return _mpProtocolClock; } inline double getSteadyClockSec() const { return _steadyClock; } + double getSimSpeedUpFactor() const; private: /** * Ensure a consistent update-rate using a combination of