This repository has been archived on 2024-12-15. You can view files and clone it, but cannot push or open issues or pull requests.
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);