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
2024-03-20 10:59:07 +01:00

21 lines
353 B
C++

#pragma once
#include <chrono>
#include <ostream>
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);