mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Removed some unnecessary time measurement constants.
This commit is contained in:
parent
aeb0292a3e
commit
f80658696c
|
@ -99,12 +99,11 @@ void MiximageGenerator::startThread(std::promise<bool>* miximagePromise)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const auto endTime = std::chrono::system_clock::now();
|
LOG(LogDebug) << "MiximageGenerator::MiximageGenerator(): Processing completed in: "
|
||||||
|
<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
LOG(LogDebug)
|
std::chrono::system_clock::now() - startTime)
|
||||||
<< "MiximageGenerator::MiximageGenerator(): Processing completed in: "
|
.count()
|
||||||
<< std::chrono::duration_cast<std::chrono::milliseconds>(endTime - startTime).count()
|
<< " ms";
|
||||||
<< " ms";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mResultMessage = mMessage;
|
mResultMessage = mMessage;
|
||||||
|
|
|
@ -627,11 +627,10 @@ int main(int argc, char* argv[])
|
||||||
SDL_GameControllerEventState(SDL_ENABLE);
|
SDL_GameControllerEventState(SDL_ENABLE);
|
||||||
|
|
||||||
int lastTime = SDL_GetTicks();
|
int lastTime = SDL_GetTicks();
|
||||||
const auto applicationEndTime = std::chrono::system_clock::now();
|
|
||||||
|
|
||||||
LOG(LogInfo) << "Application startup time: "
|
LOG(LogInfo) << "Application startup time: "
|
||||||
<< std::chrono::duration_cast<std::chrono::milliseconds>(applicationEndTime -
|
<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
applicationStartTime)
|
std::chrono::system_clock::now() - applicationStartTime)
|
||||||
.count()
|
.count()
|
||||||
<< " ms";
|
<< " ms";
|
||||||
|
|
||||||
|
|
|
@ -510,10 +510,9 @@ void Window::render()
|
||||||
mCachedBackground = true;
|
mCachedBackground = true;
|
||||||
|
|
||||||
#if (CLOCK_BACKGROUND_CREATION)
|
#if (CLOCK_BACKGROUND_CREATION)
|
||||||
const auto backgroundEndTime = std::chrono::system_clock::now();
|
|
||||||
LOG(LogDebug) << "Window::render(): Time to create cached background: "
|
LOG(LogDebug) << "Window::render(): Time to create cached background: "
|
||||||
<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
<< std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||||
backgroundEndTime - backgroundStartTime)
|
std::chrono::system_clock::now() - backgroundStartTime)
|
||||||
.count()
|
.count()
|
||||||
<< " ms";
|
<< " ms";
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -438,10 +438,10 @@ namespace Renderer
|
||||||
// application functioning normally.
|
// application functioning normally.
|
||||||
const auto beforeSwap = std::chrono::system_clock::now();
|
const auto beforeSwap = std::chrono::system_clock::now();
|
||||||
SDL_GL_SwapWindow(getSDLWindow());
|
SDL_GL_SwapWindow(getSDLWindow());
|
||||||
const auto afterSwap = std::chrono::system_clock::now();
|
|
||||||
|
|
||||||
if (std::chrono::duration_cast<std::chrono::milliseconds>(afterSwap - beforeSwap).count() <
|
if (std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now() -
|
||||||
3.0)
|
beforeSwap)
|
||||||
|
.count() < 3.0)
|
||||||
SDL_Delay(10);
|
SDL_Delay(10);
|
||||||
#else
|
#else
|
||||||
SDL_GL_SwapWindow(getSDLWindow());
|
SDL_GL_SwapWindow(getSDLWindow());
|
||||||
|
|
Loading…
Reference in a new issue