X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2Fsubsystem_mgr.hxx;h=5b449ccab160063b5539e8ae46cff2062d3f531c;hb=1f6555c9ad3fb75cb474fbf99b46333830285514;hp=63cad43e769121515d3b0c6321365a2cd57bff77;hpb=f86e6d344c97bdabbe017ee666258cf760680e8c;p=simgear.git diff --git a/simgear/structure/subsystem_mgr.hxx b/simgear/structure/subsystem_mgr.hxx index 63cad43e..5b449cca 100644 --- a/simgear/structure/subsystem_mgr.hxx +++ b/simgear/structure/subsystem_mgr.hxx @@ -45,9 +45,11 @@ private: SGTimeStamp time; public: - TimingInfo(string name, SGTimeStamp &t) { eventName = name; time = t;}; - string getName() { return eventName; }; - SGTimeStamp getTime() { return time; }; + TimingInfo(const string& name, const SGTimeStamp &t) : + eventName(name), time(t) + { } + const string& getName() const { return eventName; } + const SGTimeStamp& getTime() const { return time; } }; typedef vector eventTimeVec; @@ -271,7 +273,7 @@ public: * Place time stamps at strategic points in the execution of subsystems * update() member functions. Predominantly for debugging purposes. */ - void stamp(string name); + void stamp(const string& name); @@ -315,6 +317,10 @@ public: void collectDebugTiming(bool collect); + /** + * + */ + void set_fixed_update_time(double fixed_dt); private: class Member { @@ -338,11 +344,15 @@ private: double min_step_sec; double elapsed_sec; bool collectTimeStats; + int exceptionCount; }; Member * get_member (const string &name, bool create = false); vector _members; + + double _fixedUpdateTime; + double _updateTimeRemainder; }; @@ -374,6 +384,9 @@ public: enum GroupType { INIT = 0, GENERAL, + FDM, ///< flight model, autopilot, instruments that run coupled + POST_FDM, ///< certain subsystems depend on FDM data + DISPLAY, ///< view, camera, rendering updates MAX_GROUPS };