17 lines
241 B
C
17 lines
241 B
C
|
#pragma once
|
||
|
|
||
|
#include <chrono>
|
||
|
#include <string>
|
||
|
|
||
|
class Timer {
|
||
|
private:
|
||
|
std::string name_;
|
||
|
std::chrono::time_point<std::chrono::high_resolution_clock> start_;
|
||
|
|
||
|
public:
|
||
|
Timer(std::string_view name);
|
||
|
|
||
|
void start();
|
||
|
void stop();
|
||
|
};
|