public void Dispose()
 {
     try
     {
         _udpServer = null;
         _udpClient = null;
     }
     catch (Exception ex)
     {
         SimpleService.WriteLog(ex.Message + Environment.NewLine + ex.StackTrace);
         throw;
     }
 }
 private void PerformTimeSync(string TimeServer)
 {
     try
     {
         SimpleService.WriteLog($"Connecting to Time Server: {TimeServer}");
         _udpClient = new NTPClient(TimeServer);
         _udpClient.Connect(true);
         SimpleService.WriteLog($"{_udpClient.ToString()}");
     }
     catch (Exception ex)
     {
         SimpleService.WriteLog($"ERROR: {ex.Message}");
     }
 }