VectorSearch/lib_vector_search/include/timer.h

20 lines
334 B
C++

#pragma once
#include <chrono>
class Timer {
private:
std::chrono::time_point<std::chrono::high_resolution_clock> start_;
std::chrono::time_point<std::chrono::high_resolution_clock> end_;
public:
Timer();
void start();
void stop();
long us() const;
};
std::ostream &operator<<(std::ostream &os, const Timer &timer);