From 5c7c66332fcac5ea03179148ce356cc9b2eb64d8 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 10 Aug 2017 12:32:49 -0700 Subject: [PATCH] timedata: whitespace. --- lib/protocol/timedata.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/protocol/timedata.js b/lib/protocol/timedata.js index ddefcc14..310c090a 100644 --- a/lib/protocol/timedata.js +++ b/lib/protocol/timedata.js @@ -69,17 +69,20 @@ TimeData.prototype.add = function add(id, time) { if (Math.abs(median) >= 70 * 60) { if (!this.checked) { let match = false; + for (const offset of this.samples) { if (offset !== 0 && Math.abs(offset) < 5 * 60) { match = true; break; } } + if (!match) { this.checked = true; this.emit('mismatch'); } } + median = 0; }