Skip to content

Commit

Permalink
Merge pull request #80 from matteodanelli/matteodanelli-config-delay
Browse files Browse the repository at this point in the history
Added configuration apiDelay
  • Loading branch information
matteodanelli authored Mar 25, 2021
2 parents 9fa5792 + eb05d73 commit d6b18ff
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions MMM-cryptocurrency.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Module.register('MMM-cryptocurrency', {
maximumFractionDigits: 5,
coloredLogos: true,
fontSize: 'xx-large',
limit: '100'
limit: '100',
apiDelay: 300000,
},

sparklineIds: {
Expand Down Expand Up @@ -142,8 +143,8 @@ Module.register('MMM-cryptocurrency', {

scheduleUpdate: function() {
var self = this
// Refresh time should not be less than 5 minutes
var delay = 300000
// Refresh time should not be less than 5 minutes
var delay = this.config.apiDelay
setInterval(function() {
self.getTicker()
}, delay)
Expand Down

0 comments on commit d6b18ff

Please sign in to comment.