diff options
| author | Nicolas James <nj3ahxac@gmail.com> | 2026-03-29 20:44:23 +1100 |
|---|---|---|
| committer | Nicolas James <nj3ahxac@gmail.com> | 2026-03-29 20:44:23 +1100 |
| commit | 681bd5096ee416b50dd7338de30af7b3db385a36 (patch) | |
| tree | 358b6bc6f9a3af66729b8ac3b15dd38cc0f4bd2a /src/timestamp_pool.hh | |
| parent | d5ef2dbbd77c69dd93e92d5b7046a65c2361b59b (diff) | |
Implement Reflex - break AntiLag in the process. Remove AntiLag1. WIP
Diffstat (limited to 'src/timestamp_pool.hh')
| -rw-r--r-- | src/timestamp_pool.hh | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/timestamp_pool.hh b/src/timestamp_pool.hh index 67b34de..0d6c52d 100644 --- a/src/timestamp_pool.hh +++ b/src/timestamp_pool.hh @@ -18,11 +18,12 @@ #include <unordered_set> #include <vector> -#include "device_context.hh" +#include "device_clock.hh" namespace low_latency { class QueueContext; +class DeviceContext; class TimestampPool final { private: @@ -119,20 +120,15 @@ class TimestampPool final { void setup_command_buffers(const Handle& tail, const QueueContext& queue_context) const; - // Attempts to get_time, but returns an optional if it's not available - // yet. - std::optional<DeviceContext::Clock::time_point_t> get_time(); - - // Calls get_time() repeatedly under a spinlock, or gives up at - // time_point_t and returns std::nullopt. - std::optional<DeviceContext::Clock::time_point_t> - get_time_spinlock(const DeviceContext::Clock::time_point_t& until); + public: + // Attempts to get the time - optional if it's not available yet. + std::optional<DeviceClock::time_point_t> get_time(); - // Calls get_time() repeatedly under a spinlock until it's available. - DeviceContext::Clock::time_point_t get_time_spinlock(); + // Waits until the time is available and returns it. + DeviceClock::time_point_t await_time(); // Calls get_time with the assumption it's already available. - DeviceContext::Clock::time_point_t get_time_required(); + DeviceClock::time_point_t get_time_required(); }; public: |
