blob: 0c355b7f8282beffd7ee2abf483c8ecbba25fd55 [file] [log] [blame]
Krzysztof Grobelny80697712021-03-04 09:49:27 +00001#pragma once
2
3#include <chrono>
4
5namespace interfaces
6{
7
8class 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