Moved websocket handling to its own file and cleaned up index.ts

This commit is contained in:
softsimon
2020-02-26 17:49:53 +07:00
parent e0726f9493
commit e4bd08cf31
7 changed files with 231 additions and 188 deletions

View File

@@ -11,10 +11,11 @@ class Statistics {
this.newStatisticsEntryCallback = fn;
}
constructor() {
}
constructor() { }
public startStatistics(): void {
console.log('Starting statistics service');
const now = new Date();
const nextInterval = new Date(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(),
Math.floor(now.getMinutes() / 1) * 1 + 1, 0, 0);