Atmo.UI.DevEx.MainForm.GetTimeCorrection C# (CSharp) Метод

GetTimeCorrection() приватный Метод

private GetTimeCorrection ( System.DateTime nDT ) : double
nDT System.DateTime
Результат double
        private double GetTimeCorrection( DateTime nDT)
        {
            //rp - time sychronization
            string ntpServer1 = "pool.ntp.org";
            string ntpServer2 = "time.windows.com";

            double correct = 0;

            DateTime dt = GetNetworkTime(ntpServer1);

            // nepodarilo sa synchronizovat
            if (dt.Year == 1905)
            {
            //                return -123456;
                dt = GetNetworkTime(ntpServer2);
            }

            // podarilo sa synchronizovat
            if (dt.Year != 1905)
            {
                correct = ( dt - nDT ).TotalMilliseconds;
                return correct;
            }

            return -123456;
        }
MainForm