Merge branch 'master' of https://github.com/Cryptkeeper/Minetrack into uplot

This commit is contained in:
Nick Krecklow
2020-05-14 20:50:51 -05:00
9 changed files with 97 additions and 76 deletions

View File

@ -10,7 +10,7 @@ class TimeTracker {
}
newPointTimestamp () {
const timestamp = new Date().getTime()
const timestamp = TimeTracker.getEpochMillis()
TimeTracker.pushAndShift(this._serverGraphPoints, timestamp, TimeTracker.getMaxServerGraphDataLength())
@ -53,6 +53,10 @@ class TimeTracker {
return Math.floor(timestamp / 1000)
}
static getEpochMillis () {
return new Date().getTime()
}
static getMaxServerGraphDataLength () {
return Math.ceil(config.serverGraphDuration / config.rates.pingAll)
}