add serverGraphDuration config option

This commit is contained in:
Nick Krecklow
2020-05-08 01:54:04 -05:00
parent aee7b565b2
commit f467fa1938
10 changed files with 52 additions and 55 deletions

View File

@ -1,7 +1,6 @@
const SERVER_GRAPH_DATA_MAX_LENGTH = require('./servers').SERVER_GRAPH_DATA_MAX_LENGTH
class TimeTracker {
constructor () {
constructor (app) {
this._app = app
this._points = []
}
@ -10,7 +9,7 @@ class TimeTracker {
this._points.push(timestamp)
if (this._points.length > SERVER_GRAPH_DATA_MAX_LENGTH) {
if (this._points.length > this._app.pingController.getMaxServerGraphDataLength()) {
this._points.shift()
}