Renaming / more consistent naming.
This commit is contained in:
parent
dca2132087
commit
7ec9d036d6
2 changed files with 10 additions and 10 deletions
|
@ -88,11 +88,11 @@ void TimeManager::init()
|
|||
_warp->getIntValue());
|
||||
globals->set_time_params(_impl);
|
||||
|
||||
// frame-rate / worst-case delay / update-rate counters
|
||||
// frame-rate / worst-case latency / update-rate counters
|
||||
_frameRate = fgGetNode("/sim/frame-rate", true);
|
||||
_frameDelayMax = fgGetNode("/sim/frame-delay-max-ms", true);
|
||||
_frameLatency = fgGetNode("/sim/frame-latency-max-ms", true);
|
||||
_lastFrameTime = 0;
|
||||
_wcFrameDelayMax = 0.0;
|
||||
_frameLatencyMax = 0.0;
|
||||
_frameCount = 0;
|
||||
}
|
||||
|
||||
|
@ -162,8 +162,8 @@ void TimeManager::computeTimeDeltas(double& simDt, double& realDt)
|
|||
SGTimeStamp currentStamp;
|
||||
currentStamp.stamp();
|
||||
double dt = (currentStamp - _lastStamp).toSecs();
|
||||
if (dt > _wcFrameDelayMax)
|
||||
_wcFrameDelayMax = dt;
|
||||
if (dt > _frameLatencyMax)
|
||||
_frameLatencyMax = dt;
|
||||
|
||||
// Limit the time we need to spend in simulation loops
|
||||
// That means, if the /sim/max-simtime-per-frame value is strictly positive
|
||||
|
@ -255,9 +255,9 @@ void TimeManager::computeFrameRate()
|
|||
// Calculate frame rate average
|
||||
if ((_impl->get_cur_time() != _lastFrameTime)) {
|
||||
_frameRate->setIntValue(_frameCount);
|
||||
_frameDelayMax->setDoubleValue(_wcFrameDelayMax*1000);
|
||||
_frameLatency->setDoubleValue(_frameLatencyMax*1000);
|
||||
_frameCount = 0;
|
||||
_wcFrameDelayMax = 0.0;
|
||||
_frameLatencyMax = 0.0;
|
||||
}
|
||||
|
||||
_lastFrameTime = _impl->get_cur_time();
|
||||
|
|
|
@ -78,11 +78,11 @@ private:
|
|||
SGPropertyNode_ptr _longitudeDeg;
|
||||
SGPropertyNode_ptr _latitudeDeg;
|
||||
|
||||
// frame-rate / worst-case delay / update-rate counters
|
||||
// frame-rate / worst-case latency / update-rate counters
|
||||
SGPropertyNode_ptr _frameRate;
|
||||
SGPropertyNode_ptr _frameDelayMax;
|
||||
SGPropertyNode_ptr _frameLatency;
|
||||
time_t _lastFrameTime;
|
||||
double _wcFrameDelayMax;
|
||||
double _frameLatencyMax;
|
||||
int _frameCount;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue