sensord: increase time jump tolerance

diffs on the order of ~5ms are somewhat common and false positives
This commit is contained in:
Adeeb Shihadeh 2024-11-11 14:21:50 -08:00 committed by GitHub
parent f3e28275d9
commit a683b7d99c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ void interrupt_loop(std::vector<std::tuple<Sensor *, std::string>> sensors) {
uint64_t cur_offset = nanos_since_epoch() - nanos_since_boot();
uint64_t diff = cur_offset > offset ? cur_offset - offset : offset - cur_offset;
if (diff > 1*1e6) { // 1ms
if (diff > 10*1e6) { // 10ms
LOGW("time jumped: %lu %lu", cur_offset, offset);
offset = cur_offset;