1
0
Files

22 lines
450 B
C++
Raw Permalink Normal View History

2026-01-09 19:29:39 +08:00
#pragma once
#include <chrono>
namespace basalt::presenter::stopwatch {
/**
* @brief FPS计算器FPS并输出
*/
class Stopwatch {
public:
Stopwatch(size_t interval);
~Stopwatch();
void tick();
private:
std::chrono::steady_clock::time_point start_point;
size_t interval, counter;
};
} // namespace basalt::presenter::stopwatch