Krzysztof Grobelny | 8069771 | 2021-03-04 09:49:27 +0000 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <chrono> |
| 4 | |
| 5 | namespace interfaces |
| 6 | { |
| 7 | |
| 8 | class Clock |
| 9 | { |
| 10 | public: |
| 11 | using duration = std::chrono::steady_clock::time_point::duration; |
| 12 | using rep = std::chrono::steady_clock::time_point::rep; |
| 13 | using period = std::chrono::steady_clock::time_point::period; |
| 14 | using time_point = std::chrono::steady_clock::time_point; |
| 15 | |
| 16 | virtual ~Clock() = default; |
| 17 | |
| 18 | virtual time_point now() const noexcept = 0; |
| 19 | virtual uint64_t timestamp() const noexcept = 0; |
| 20 | }; |
| 21 | |
| 22 | } // namespace interfaces |