Пример #1
0
        protected override void OnTick()
        {
            if (m_Restarting || !Enabled)
            {
                return;
            }

            if (DateTime.UtcNow < m_RestartTime)
            {
                return;
            }

            if (WarningDelay > TimeSpan.Zero)
            {
                Warning_Callback();
                Timer.DelayCall(WarningDelay, WarningDelay, new TimerCallback(Warning_Callback));
            }

            AutoSave.Save();

            m_Restarting = true;

            Timer.DelayCall(RestartDelay, new TimerCallback(Restart_Callback));
        }
Пример #2
0
 public static void Save()
 {
     AutoSave.Save(false);
 }