| 376 | } |
| 377 | |
| 378 | bool getTimeBelowOrEqual(const KeyType &ID, const double TimeIn, double& TimeOut) const |
| 379 | { |
| 380 | if (!this->checkID(ID)) |
| 381 | { |
| 382 | PRINT_ERROR("Key does not exist: ", ID); |
| 383 | return false; |
| 384 | } |
| 385 | |
| 386 | /** catch equal case at first */ |
| 387 | if (_DataStreams.at(ID).count(TimeIn) > 0) |
| 388 | { |
| 389 | const auto It = _DataStreams.at(ID).find(TimeIn); |
| 390 | TimeOut = It->first; |
| 391 | return true; /**< equal */ |
| 392 | } |
| 393 | else |
| 394 | { |
| 395 | return getTimeBelow(ID, TimeIn, TimeOut); /**< below */ |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | bool getTimeCloseTo(const KeyType &ID, const double Timestamp, double& TimestampClose) const |
| 400 | { |
no test coverage detected