Revision 5cd4364c src/timestamped_list.cpp
| src/timestamped_list.cpp | ||
|---|---|---|
| 120 | 120 |
// printf("> latency %3.2fms\n", (Timestamped().to_seconds() - target_ts.to_seconds())*1000.0);
|
| 121 | 121 |
|
| 122 | 122 |
for ( timestamped_float_list_t::iterator it = tsf_list_.begin(); it != tsf_list_.end(); ++it ) {
|
| 123 |
if (it->timestamp >= target_ts) {
|
|
| 123 |
if (it->timestamp == target_ts) {
|
|
| 124 |
// perfect match, return this value |
|
| 125 |
return it->value; |
|
| 126 |
} else if (it->timestamp > target_ts) {
|
|
| 124 | 127 |
// ok found close target |
| 125 | 128 |
if (it == tsf_list_.begin()) {
|
| 126 | 129 |
// no preceding element |
Also available in: Unified diff