16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 07:49:19 +02:00

build 170908. minor refactoring and diagnostics enhancements, virtual coupling fix, support for pantograph compressor submodels

This commit is contained in:
tmj-fstate
2017-09-09 00:55:16 +02:00
parent 53ad41afa0
commit 435dc24d3e
13 changed files with 257 additions and 217 deletions

View File

@@ -66,9 +66,9 @@ void ResetTimers()
};
LONGLONG fr, count, oldCount;
// LARGE_INTEGER fr,count;
void UpdateTimers(bool pause)
{
void UpdateTimers(bool pause) {
QueryPerformanceFrequency((LARGE_INTEGER *)&fr);
QueryPerformanceCounter((LARGE_INTEGER *)&count);
DeltaRenderTime = double(count - oldCount) / double(fr);
@@ -78,18 +78,14 @@ void UpdateTimers(bool pause)
fSoundTimer += DeltaTime;
if (fSoundTimer > 0.1)
fSoundTimer = 0.0;
/*
double CurrentTime= double(count)/double(fr);//GetTickCount();
DeltaTime= (CurrentTime-OldTime);
OldTime= CurrentTime;
*/
if (DeltaTime > 1.0)
DeltaTime = 1.0;
}
else
DeltaTime = 0.0; // wszystko stoi, bo czas nie płynie
oldCount = count;
oldCount = count;
// Keep track of the time lapse and frame count
#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
double fTime = ::GetTickCount64() * 0.001f; // Get current time in seconds
@@ -106,6 +102,7 @@ void UpdateTimers(bool pause)
}
fSimulationTime += DeltaTime;
};
};
}; // namespace timer
//---------------------------------------------------------------------------