Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Check if time is synced every 5 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
aleitner committed Oct 27, 2016
1 parent 05f37e2 commit 69f9d8e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

1 comment on commit 69f9d8e

@CJClaude
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.