文件名称:c# ntp时间 客户端
文件大小:4KB
文件格式:RAR
更新时间:2015-05-07 04:04:38
c# ntp 时间同步
用法 SNTPTimeClient client = new SNTPTimeClient(“127.0.1.1”, "123"); client.Connect(); DateTime getEd = client.ReceiveTimestamp; SystemTime st=new SystemTime(); st.wDay=(ushort)getEd.Day; st.wDayOfWeek = (ushort)getEd.DayOfWeek; st.wHour = (ushort)getEd.Hour; st.wMiliseconds = (ushort)getEd.Millisecond; st.wMinute = (ushort)getEd.Minute; st.wMonth = (ushort)getEd.Month; st.wSecond = (ushort)getEd.Second; st.wYear = (ushort)getEd.Year; SNTPTimeClient.SetLocalTime(ref st); ntp服务器windows版下载http://www.meinberg.de/english/sw/ntp.htm
【文件预览】:
SNTPTimeClient.cs