···6262#endif
6363}
64646565-void
6565+bool
6666m_relation_history_push(struct m_relation_history *rh, struct xrt_space_relation const *in_relation, uint64_t timestamp)
6767{
6868 XRT_TRACE_MARKER();
6969 struct relation_history_entry rhe;
7070 rhe.relation = *in_relation;
7171 rhe.timestamp = timestamp;
7272+ bool ret = false;
7273 os_mutex_lock(&rh->mutex);
7374 // Don't evaluate the second condition if the length is 0 - rh->impl[0] will be NULL!
7475 if ((!rh->has_first_sample) || (rhe.timestamp > rh->impl[0]->timestamp)) {
7576 // Everything explodes if the timestamps in relation_history aren't monotonically increasing. If we get
7677 // a timestamp that's before the most recent timestamp in the buffer, just don't put it in the history.
7778 rh->impl.push(rhe);
7979+ ret = true;
7880 }
7981 rh->has_first_sample = true;
8082 os_mutex_unlock(&rh->mutex);
8383+ return ret;
8184}
82858386enum m_relation_history_result
+5-3
src/xrt/auxiliary/math/m_relation_history.h
···4949 *
5050 * If the history is full, it will also pop a pose out of the other side of the buffer.
5151 *
5252+ * @return false if the timestamp is earlier than the most recent timestamp already recorded
5353+ *
5254 * @public @memberof m_relation_history
5355 */
5454-void
5656+bool
5557m_relation_history_push(struct m_relation_history *rh, struct xrt_space_relation const *in_relation, uint64_t ts);
56585759/*!
···117119 /*!
118120 * @copydoc m_relation_history_push
119121 */
120120- void
122122+ bool
121123 push(xrt_space_relation const &relation, uint64_t ts) noexcept
122124 {
123123- m_relation_history_push(mPtr, &relation, ts);
125125+ return m_relation_history_push(mPtr, &relation, ts);
124126 }
125127126128 /*!