Ejemplo n.º 1
0
        private double CalculateTime(ServerRestart restart)
        {
            DateTime nowTime     = DateTime.Now;
            DateTime restartTime = new DateTime(nowTime.Year, nowTime.Month, nowTime.Day, restart.Time.Hours, restart.Time.Minutes, 0);

            if (restartTime < nowTime)
            {
                restartTime = restartTime.AddDays(1);
            }
            return((restartTime - nowTime).TotalMilliseconds);
        }
Ejemplo n.º 2
0
 public void RestartServer()
 {
     ServerRestart?.Invoke(this, null);
 }