diff options
Diffstat (limited to 'WarframeClock/Clock.cs')
-rw-r--r-- | WarframeClock/Clock.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/WarframeClock/Clock.cs b/WarframeClock/Clock.cs index 9d1ffa7..688781b 100644 --- a/WarframeClock/Clock.cs +++ b/WarframeClock/Clock.cs @@ -2,11 +2,11 @@ namespace WarframeClock { - public class Clock + public static class Clock { - public long CetusExpiry { get; set; } = -1; + public static long CetusExpiry { get; set; } = -1; - public string CetusExpiryString() + public static string CetusExpiryString() { double currentTime = GetCurrentTime(); double cetusLen = 8998.8748; @@ -25,7 +25,7 @@ namespace WarframeClock return $"Plains: 🌙 {GetReadableTimeSpan(cetusBegin + cetusLen - currentTime)}"; } - public string VallisExpiryString() + public static string VallisExpiryString() { double currentTime = GetCurrentTime(); double dayStart = 1542131224; @@ -41,10 +41,10 @@ namespace WarframeClock return $"Vallis: ☁[→❄️] {GetReadableTimeSpan(dayStart + 1600 - currentTime)}"; } - private double GetCurrentTime() => + private static double GetCurrentTime() => DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1)).TotalMilliseconds / 1000; - private string GetReadableTimeSpan(double span) => + private static string GetReadableTimeSpan(double span) => $"{Math.Floor(span / 60)}m{Math.Floor(span % 60)}s"; } } |