stats are now showing upon bot start in console again

This commit is contained in:
Master Kwoth 2016-03-04 20:21:26 +01:00
parent e5ad9e2b8f
commit 97ed56af83

View File

@ -108,7 +108,8 @@ namespace NadekoBot {
public string Heap(bool pass = true) => Math.Round((double)GC.GetTotalMemory(pass) / 1.MiB(), 2).ToString(); public string Heap(bool pass = true) => Math.Round((double)GC.GetTotalMemory(pass) / 1.MiB(), 2).ToString();
public async Task<string> GetStats() { public async Task<string> GetStats() {
if (statsStopwatch.Elapsed.Seconds <= 5) return statsCache; if (statsStopwatch.Elapsed.Seconds < 4 &&
!string.IsNullOrWhiteSpace(statsCache)) return statsCache;
await LoadStats(); await LoadStats();
statsStopwatch.Restart(); statsStopwatch.Restart();
return statsCache; return statsCache;