diff options
Diffstat (limited to 'src/device_context.hh')
| -rw-r--r-- | src/device_context.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/device_context.hh b/src/device_context.hh index 18b89be..c76f376 100644 --- a/src/device_context.hh +++ b/src/device_context.hh @@ -46,6 +46,13 @@ struct DeviceContext final : public Context { ~Clock(); public: + // WARNING: This *MUST* be used over std::chrono::steady_clock::now if + // you're planning on comparing it to a device's clock. If it isn't, the + // timestamps might from different domains and will be completely + // nonsensical. + static time_point_t now(); + + public: void calibrate(); time_point_t ticks_to_time(const std::uint64_t& ticks) const; }; |
