You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've used this Code with Mono on a Raspberry Pi but it doesn't work. The same Code works with Visual Studio on Windows. On Windows i get "NTP OK" and on the Raspberry I get "NTP ERORR".
public static void CheckTimeOK()
{
var client = new Yort.Ntp.NtpClient("130.149.17.21");
client.TimeReceived += Client_TimeReceived;
client.ErrorOccurred += Client_ErrorOccurred;
client.BeginRequestTime();
}
public static void Client_ErrorOccurred(object sender, NtpNetworkErrorEventArgs e)
{
Console.WriteLine("NTP ERROR");
}
public static void Client_TimeReceived(object sender, NtpTimeReceivedEventArgs e)
{
System.Diagnostics.Debug.WriteLine(e.CurrentTime);
Console.WriteLine("NTP ok");
}
The text was updated successfully, but these errors were encountered:
There were a few problems with the Xamarin iOS and Android versions where the underlying monoruntime lied about supporting DnsEndpoint (or similar, I forget the details now). It could be the same thing but I can't tell because no error details are included.
Could you check you are using the latest package, and if the error still occurs, print the full exception details in your Client_ErrorOccurred event handler? The exception object should be included as part of the exception arguments (e in your exception handler above).
I've used this Code with Mono on a Raspberry Pi but it doesn't work. The same Code works with Visual Studio on Windows. On Windows i get "NTP OK" and on the Raspberry I get "NTP ERORR".
The text was updated successfully, but these errors were encountered: