public static string GetAwayTimeString(ulong epochMicrosec) { TimeUtils.ElapsedStringSet stringSet = new TimeUtils.ElapsedStringSet { m_seconds = "GLOBAL_DATETIME_AFK_SECONDS", m_minutes = "GLOBAL_DATETIME_AFK_MINUTES", m_hours = "GLOBAL_DATETIME_AFK_HOURS", m_yesterday = "GLOBAL_DATETIME_AFK_DAY", m_days = "GLOBAL_DATETIME_AFK_DAYS", m_weeks = "GLOBAL_DATETIME_AFK_WEEKS", m_monthAgo = "GLOBAL_DATETIME_AFK_MONTH" }; return(TimeUtils.GetElapsedTimeStringFromEpochMicrosec(epochMicrosec, stringSet)); }
private void InitTimeStringSet() { if (this.m_timeStringSet == null) { TimeUtils.ElapsedStringSet set = new TimeUtils.ElapsedStringSet { m_seconds = "GLOBAL_DATETIME_SPINNER_SECONDS", m_minutes = "GLOBAL_DATETIME_SPINNER_MINUTES", m_hours = "GLOBAL_DATETIME_SPINNER_HOURS", m_yesterday = "GLOBAL_DATETIME_SPINNER_DAY", m_days = "GLOBAL_DATETIME_SPINNER_DAYS", m_weeks = "GLOBAL_DATETIME_SPINNER_WEEKS", m_monthAgo = "GLOBAL_DATETIME_SPINNER_MONTH" }; this.m_timeStringSet = set; } }
public static string GetLastOnlineElapsedTimeString(ulong epochMicrosec) { if (epochMicrosec == 0) { return(GameStrings.Get("GLOBAL_OFFLINE")); } TimeUtils.ElapsedStringSet stringSet = new TimeUtils.ElapsedStringSet { m_seconds = "GLOBAL_DATETIME_LASTONLINE_SECONDS", m_minutes = "GLOBAL_DATETIME_LASTONLINE_MINUTES", m_hours = "GLOBAL_DATETIME_LASTONLINE_HOURS", m_yesterday = "GLOBAL_DATETIME_LASTONLINE_DAY", m_days = "GLOBAL_DATETIME_LASTONLINE_DAYS", m_weeks = "GLOBAL_DATETIME_LASTONLINE_WEEKS", m_monthAgo = "GLOBAL_DATETIME_LASTONLINE_MONTH" }; return(TimeUtils.GetElapsedTimeStringFromEpochMicrosec(epochMicrosec, stringSet)); }
private void UpdateTimeText() { int seconds = (TavernBrawlManager.Get().CurrentMission() != null) ? TavernBrawlManager.Get().CurrentTavernBrawlSeasonEnd : -1; if (seconds < 0) { base.CancelInvoke("UpdateTimeText"); } else { TimeUtils.ElapsedStringSet stringSet = new TimeUtils.ElapsedStringSet { m_seconds = "GLUE_TAVERN_BRAWL_LABEL_ENDING_SECONDS", m_minutes = "GLUE_TAVERN_BRAWL_LABEL_ENDING_MINUTES", m_hours = "GLUE_TAVERN_BRAWL_LABEL_ENDING_HOURS", m_days = "GLUE_TAVERN_BRAWL_LABEL_ENDING_DAYS", m_weeks = "GLUE_TAVERN_BRAWL_LABEL_ENDING_WEEKS", m_monthAgo = "GLUE_TAVERN_BRAWL_LABEL_ENDING_OVER_1_MONTH" }; string elapsedTimeString = TimeUtils.GetElapsedTimeString(seconds, stringSet); this.m_chalkboardEndInfo.Text = elapsedTimeString; } }