Refactor Config class
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-11-21 20:20:11 +01:00
parent e396ce6417
commit f74ae43673
18 changed files with 72 additions and 70 deletions

View File

@@ -1,6 +1,6 @@
package wtf.beatrice.hidekobot.utils;
import wtf.beatrice.hidekobot.Configuration;
import wtf.beatrice.hidekobot.Cache;
import java.time.Duration;
import java.time.LocalDateTime;
@@ -18,7 +18,7 @@ public class FormatUtil
public static String getNiceUptime()
{
LocalDateTime now = LocalDateTime.now();
long uptimeSeconds = ChronoUnit.SECONDS.between(Configuration.getStartupTime(), now);
long uptimeSeconds = ChronoUnit.SECONDS.between(Cache.getStartupTime(), now);
Duration uptime = Duration.ofSeconds(uptimeSeconds);
long seconds = uptime.toSecondsPart();
long minutes = uptime.toMinutesPart();