public static string IsStarted(this ClockStatus me) { if (me?.IsRunning == true) { return(""); } return("disabled"); }
public static string StatusClass(this ClockStatus me) { if (me?.IsUnavailable != false) { return("unavailable"); } if (me.IsRealtime) { return("realtime"); } if (me.IsRunning) { return("fastclock"); } return("stopped"); }
public static string SecondsPerHour(this ClockStatus me) { var speed = me == null ? 0 : me.Speed; return((60 / speed).ToString("F0", CultureInfo.CurrentCulture)); }