From 0deb469d5a7c9a16179139dcff74a54aac1791a0 Mon Sep 17 00:00:00 2001 From: Nicolas James Date: Sat, 14 Feb 2026 14:05:26 +1100 Subject: commit wip --- src/device_context.hh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/device_context.hh') diff --git a/src/device_context.hh b/src/device_context.hh index b55b70c..c08cec2 100644 --- a/src/device_context.hh +++ b/src/device_context.hh @@ -35,8 +35,11 @@ struct DeviceContext final : public Context { std::unordered_map swapchain_signals; struct Clock { + public: using time_point_t = std::chrono::steady_clock::time_point; + const DeviceContext& device; + public: time_point_t cpu_time; std::uint64_t error_bound; std::uint64_t device_ticks; @@ -45,7 +48,10 @@ struct DeviceContext final : public Context { public: Clock(const DeviceContext& device); - + ~Clock(); + + public: + void calibrate(); time_point_t ticks_to_time(const std::uint64_t& ticks) const; }; Clock clock; @@ -61,9 +67,6 @@ struct DeviceContext final : public Context { void notify_acquire(const VkSwapchainKHR& swapchain, const std::uint32_t& image_index, const VkSemaphore& signal_semaphore); - - public: - void calibrate_timestamps(); }; }; // namespace low_latency -- cgit v1.2.3