Skip to content

Commit

Permalink
Display the approximate time of next epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy007 committed Dec 17, 2015
1 parent 9d4666e commit eb9a07e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
{{#if diff}}
<strong>Difficulty:</strong> <span class="label label-primary">{{formatNumber diff}}</span>
{{/if}}
<strong>Next Epoch:</strong> <span class="label label-primary">{{formatRelative nextEpoch now units="hour"}}</span>
<strong>Mode:</strong>
{{#if current.pool}}
<span class="label label-success">POOL</span>
Expand Down
3 changes: 3 additions & 0 deletions www/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ function refreshStats(template) {
stats.miners = stats.miners.sort(compare)
}

var epochOffset = (30000 - (stats.height % 30000)) * 1000 * 17
stats.nextEpoch = stats.now + epochOffset

// Repaint stats
var html = template(stats);
$('#stats').html(html);
Expand Down

0 comments on commit eb9a07e

Please sign in to comment.