private void OnTimeChanged(TimeChangedEventArgs args) { if (OnTimeReceived != null) { OnTimeReceived(this, args); } }
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); } }