| 103 | } |
| 104 | |
| 105 | static timer_t measure(time_unit unit, const std::function<void()> &func) |
| 106 | { |
| 107 | timer_t begin(0), end(0); |
| 108 | begin = time(unit); |
| 109 | func(); |
| 110 | end = time(unit); |
| 111 | return end - begin; |
| 112 | } |
| 113 | }; |
| 114 | |
| 115 | std::chrono::time_point<std::chrono::high_resolution_clock> timer::m_timer(std::chrono::high_resolution_clock::now()); |