From 97ed56af83f4a32a8dce3db91cf487b3a983506a Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Fri, 4 Mar 2016 20:21:26 +0100 Subject: [PATCH] stats are now showing upon bot start in console again --- NadekoBot/Classes/NadekoStats.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NadekoBot/Classes/NadekoStats.cs b/NadekoBot/Classes/NadekoStats.cs index 3c29cc23..4733c451 100644 --- a/NadekoBot/Classes/NadekoStats.cs +++ b/NadekoBot/Classes/NadekoStats.cs @@ -108,7 +108,8 @@ namespace NadekoBot { public string Heap(bool pass = true) => Math.Round((double)GC.GetTotalMemory(pass) / 1.MiB(), 2).ToString(); public async Task GetStats() { - if (statsStopwatch.Elapsed.Seconds <= 5) return statsCache; + if (statsStopwatch.Elapsed.Seconds < 4 && + !string.IsNullOrWhiteSpace(statsCache)) return statsCache; await LoadStats(); statsStopwatch.Restart(); return statsCache;