| 40 | /// The returned value is the count of the time metric. |
| 41 | template <typename T = Milliseconds> |
| 42 | int Elapsed() const { |
| 43 | static_assert( |
| 44 | std::is_same<T, Seconds>::value || |
| 45 | std::is_same<T, Milliseconds>::value || |
| 46 | std::is_same<T, Hours>::value || |
| 47 | std::is_same<T, Microseconds>::value, |
| 48 | "Template arg must be Seconds | Milliseconds | Hours | Microseconds"); |
| 49 | auto now = std::chrono::high_resolution_clock::now(); |
| 50 | return std::chrono::duration_cast<T>(now - last_).count(); |
| 51 | } |
| 52 | /// Return the string rep of current wall time |
| 53 | // std::string CurrentTime(); |
| 54 |
no outgoing calls