From 69f9d8ef7b41fa8c19a8a4c0ab9186f32f54d3a9 Mon Sep 17 00:00:00 2001 From: aleitner Date: Thu, 27 Oct 2016 17:02:20 -0400 Subject: [PATCH] Check if time is synced every 5 seconds --- app/client.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/client.js b/app/client.js index bcf1f35..443a821 100644 --- a/app/client.js +++ b/app/client.js @@ -706,6 +706,19 @@ var main = new Vue({ } }, 600000); + setInterval(function() { + var tab = self.userdata.tabs[self.current]; + var farmer = typeof tab.farmer === 'function' ? tab.farmer() : null; + storj.utils.ensureNtpClockIsSynchronized(function(err) { + if (err) { + if (farmer) { + self.stopFarming(); + } + window.alert(err.message); + } + }); + }, 5000); + // Update Used Percentage and peer count setInterval(function() { var tab = self.userdata.tabs[self.current];