diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-02-14 14:05:26 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2026-02-14 14:05:26 +1100 |
| commit | 0deb469d5a7c9a16179139dcff74a54aac1791a0 (patch) | |
| tree | 2f791a72f0441a30321332f5ecea5865f357e2bb /src/device_context.hh | |
| parent | 8f4501215c0dbbbde59da2d015fdec3dbe5131bc (diff) | |
commit wip
Diffstat (limited to 'src/device_context.hh')
| -rw-r--r-- | src/device_context.hh | 11 |
1 files changed, 7 insertions, 4 deletions
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<VkSwapchainKHR, index_semaphores_t> 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 |
