58 _list =
new item_t[num_items];
70 void put(
const T &new_value)
76 if (
_list[i].timestamp_us == 0) {
87 if (
_list[i].timestamp_us <
_list[oldest_i].timestamp_us) {
117 if (
_list[i].timestamp_us != 0) {
T * get_next()
Iterate through all active values (not sorted).
void reset_to_start()
Before iterating using get_next(), reset to start.
High-resolution timer with callouts and timekeeping.
TimestampedList(int num_items)
TimestampedList operator=(const TimestampedList &)=delete
void update_current()
Update the timestamp of the item we have gotten.
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
void put(const T &new_value)
Insert a value into the list, overwrite the oldest entry if full.
void drop_current()
Disable the last item that we have gotten.
__EXPORT hrt_abstime hrt_absolute_time(void)
Get absolute time in [us] (does not wrap).