mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-22 13:05:34 +00:00
restructure codebase according to vcproj filters
This commit is contained in:
16
Minecraft.World/ConsoleHelpers/PerformanceTimer.cpp
Normal file
16
Minecraft.World/ConsoleHelpers/PerformanceTimer.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "../Header Files/stdafx.h"
|
||||
#include "PerformanceTimer.h"
|
||||
|
||||
PerformanceTimer::PerformanceTimer() { Reset(); }
|
||||
|
||||
void PerformanceTimer::Reset() {
|
||||
m_startTime = std::chrono::steady_clock::now();
|
||||
}
|
||||
|
||||
void PerformanceTimer::PrintElapsedTime(const std::wstring& description) {
|
||||
const std::chrono::duration<float> elapsedTime =
|
||||
std::chrono::steady_clock::now() - m_startTime;
|
||||
|
||||
app.DebugPrintf("TIMER: %ls: Elapsed time %f\n", description.c_str(),
|
||||
elapsedTime.count());
|
||||
}
|
||||
Reference in New Issue
Block a user