Merge branch 'master' of https://github.com/Cryptkeeper/Minetrack into uplot
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user