Files
deepMiner/include/Timer.h
T
fegger 7eef89fece ```
Switch from Debug to Release build configuration

Remove deprecated codecvt.h dependency
Add new Renderer class for GUI support
Implement basic game timing with program start tracking
Create main_gui.cpp for SDL2-based rendered application
Update Timer to track duration in reference variable
Add font loading and rendering capabilities
Remove debug flags from build configuration
```
2026-04-28 19:25:34 +02:00

23 lines
473 B
C++

#pragma once
#include <chrono>
#include <iostream>
struct Timer {
using Clock = std::chrono::high_resolution_clock;
using Duration = std::chrono::duration<float>;
std::chrono::time_point<Clock> start, end;
Duration duration;
explicit Timer ( Duration& target ) : target_ ( target ), start_( Clock::now() ) {}
~Timer () noexcept {
target_ = Clock::now() - start_;
}
private:
Duration& target_;
Clock::time_point start_;
};