diff --git a/ui/ZeroTierNode.jsx b/ui/ZeroTierNode.jsx index 566bdc602..1edab4087 100644 --- a/ui/ZeroTierNode.jsx +++ b/ui/ZeroTierNode.jsx @@ -10,8 +10,10 @@ var ZeroTierNode = React.createClass({ }, ago: function(ms) { - var tmp = (Date.now() - ms); - return ((tmp > 0) ? tmp : 0); + if (ms > 0) { + var tmp = Math.round((Date.now() - ms) / 1000); + return ((tmp > 0) ? tmp : 0); + } else return 0; }, updatePeers: function() { @@ -88,7 +90,7 @@ var ZeroTierNode = React.createClass({ componentDidMount: function() { this.tabIndex = 0; this.updateAll(); - this.updateIntervalId = setInterval(this.updateAll,5000); + this.updateIntervalId = setInterval(this.updateAll,2500); }, componentWillUnmount: function() { clearInterval(this.updateIntervalId); @@ -105,12 +107,12 @@ var ZeroTierNode = React.createClass({ { (this.tabIndex === 1) ? (