millisceonds

This commit is contained in:
Michael Simard
2020-06-16 18:16:21 -05:00
parent 34e4bc6060
commit 2373d73cfd

View File

@@ -339,7 +339,7 @@ struct StatsController: RouteCollection {
if !(stats.totalWins == 0 && stats.totalLosses == 0) { if !(stats.totalWins == 0 && stats.totalLosses == 0) {
let date = self.createDate(day: first.day, month: first.month, year: first.year) let date = self.createDate(day: first.day, month: first.month, year: first.year)
cumulativeWinLossRatios.append(DataPoint(x:date.timeIntervalSince1970 , y: (totalWins/totalLosses).truncate(places: 2))) cumulativeWinLossRatios.append(DataPoint(x:date.timeIntervalSince1970*1000 , y: (totalWins/totalLosses).truncate(places: 2)))
} }
allDailyStats.append(DailyStats(day: first.day, month: first.month, year: first.year, stats: stats, cumulativeRatio: self.getRatio(num: totalWins, den: totalLosses))) allDailyStats.append(DailyStats(day: first.day, month: first.month, year: first.year, stats: stats, cumulativeRatio: self.getRatio(num: totalWins, den: totalLosses)))
return getRatios(remaining, allDailyStats:&allDailyStats, cumulativeWinLossRatios:&cumulativeWinLossRatios, eventLoop: eventLoop) return getRatios(remaining, allDailyStats:&allDailyStats, cumulativeWinLossRatios:&cumulativeWinLossRatios, eventLoop: eventLoop)