| 581 | } |
| 582 | |
| 583 | void |
| 584 | FrequencyCorrectionDialog::setTimestamp(struct timeval const &tv) |
| 585 | { |
| 586 | if (!this->realTime) { |
| 587 | struct timeval delta; |
| 588 | |
| 589 | timersub(&tv, &this->timeStamp, &delta); |
| 590 | |
| 591 | // If the delta is suspiciously big, or backwards in time, recalculate |
| 592 | // ALOS |
| 593 | if (delta.tv_sec >= 1 || delta.tv_sec < 0 || delta.tv_usec < 0) |
| 594 | this->haveALOS = false; |
| 595 | |
| 596 | this->timeStamp = tv; |
| 597 | this->updatePrediction(); |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | void |
| 602 | FrequencyCorrectionDialog::resetTimestamp(struct timeval const &tv) |