Commit 30283570 authored by Rick Ho's avatar Rick Ho
Browse files

add timer

parent 2b5672e5
#ifndef TIMER_HH
#define TIMER_HH
#include <chrono>
inline double getDuration(std::chrono::time_point<std::chrono::system_clock> a,
std::chrono::time_point<std::chrono::system_clock> b) {
return std::chrono::duration<double>(b - a).count();
}
#define timestamp(__var__) auto __var__ = std::chrono::system_clock::now();
#include <chrono>
#endif // TIMER_HH
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment