6 #ifndef CHEBYSHEV_TIMER_H
7 #define CHEBYSHEV_TIMER_H
20 std::chrono::time_point<std::chrono::high_resolution_clock> s;
32 s = std::chrono::high_resolution_clock::now();
38 inline long double get()
const {
40 auto start = std::chrono::time_point_cast<std::chrono::milliseconds>(s)
43 auto end = std::chrono::time_point_cast<std::chrono::milliseconds>(
44 std::chrono::high_resolution_clock::now())
47 return (
long double) (end -
start).count();
Timer class to measure elapsed time in milliseconds.
Definition: timer.h:18
long double operator()()
Returns the elapsed time since construction or start of the timer in milliseconds.
Definition: timer.h:54
timer()
Constructs the timer storing the current time.
Definition: timer.h:25
long double get() const
Returns the elapsed time since construction or start of the timer in milliseconds.
Definition: timer.h:38
void start()
Start the timer.
Definition: timer.h:31
void benchmark(const std::string &name, Function func, const std::vector< InputType > &input, unsigned int runs=settings.defaultRuns, bool quiet=false)
Run a benchmark on a generic function, with the given input vector.
Definition: benchmark.h:187
General namespace of the framework.
Definition: benchmark_structures.h:16