I have two pc's on the same network.
One of them I know the current time, the other is inaccessible by me.
I have found that you can ping another machine to get a timestamp from it.
So it would look like ...
PC1 time ping sent
PC2 time ping received
PC2 time return ping sent
PC1 time return recieved
I have the following code
Dim pingbyte(31) As Byte
Dim timestamp As New Net.NetworkInformation.PingOptions
PingReturn = New Net.NetworkInformation.Ping
sReturn = PingReturn.Send("xxx.xxx.xxx.xxx")
Dim properties As IPGlobalProperties = IPGlobalProperties.GetIPGlobalProperties()
Dim statistics As IcmpV4Statistics = properties.GetIcmpV4Statistics()
MsgBox("Timestamp Requests ... Sent: " & statistics.TimestampRequestsSent.ToString & " Received: " & statistics.TimestampRequestsReceived.ToString & vbCr & "Timestamp Replies ... Sent: " & statistics.TimestampRepliesSent.ToString & " Received: " & statistics.TimestampRepliesReceived.ToString)
The message box always has 0 for sent and received ... What am I missing?