aboutsummaryrefslogtreecommitdiff
path: root/src/frame_span.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/frame_span.cc')
-rw-r--r--src/frame_span.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/frame_span.cc b/src/frame_span.cc
new file mode 100644
index 0000000..732d6f3
--- /dev/null
+++ b/src/frame_span.cc
@@ -0,0 +1,24 @@
+#include "frame_span.hh"
+
+namespace low_latency {
+
+FrameSpan::FrameSpan(std::shared_ptr<TimestampPool::Handle> handle)
+ : head_handle(std::move(handle)) {
+ assert(this->head_handle); // Must not be null
+}
+
+FrameSpan::~FrameSpan() {}
+
+void FrameSpan::update(std::shared_ptr<TimestampPool::Handle> handle) {
+ this->tail_handle = std::move(handle);
+}
+
+void FrameSpan::await_completed() const {
+ if (this->tail_handle) {
+ this->tail_handle->await_end();
+ return;
+ }
+ this->head_handle->await_end();
+}
+
+} // namespace low_latency \ No newline at end of file