示例#1
0
 private void OnTimeChanged(TimeChangedEventArgs args)
 {
     if (OnTimeReceived != null)
     {
         OnTimeReceived(this, args);
     }
 }
示例#2
0
        private void Synchronize(object state)
        {
            SntpMessage requestMessage  = new SntpMessage();
            SntpMessage responseMessage = new SntpMessage();

            responseMessage = SendRequest(requestMessage);

            if (responseMessage != null)
            {
                TimeChangedEventArgs args = new TimeChangedEventArgs(responseMessage);
                this.OnTimeChanged(args);
            }
        }