NTP time synchro using Legato API on FX30

Hello,

I’m looking for a way to use Legato API to synchronize the system time using NTP, as mentioned here. However I’m encountering issues when trying to add the binding to this service, as it seems it is not running onto my FX30. Could someone provide an example as how to correctly sync time in a Legato 21 fx30 app ? Previous developer directly called system("/usr/sbin/ntpd -dqnp pool.ntp.org") but it doesn’t look very compliant to use system call to do that.

What is the problem of using the system() call?

We usually prefer to use API or more standard function over calling OS specific function, even if here the target is predictable I do not consider it to be good practice in production environment.

As I found the API mentioned above I was thinking it was the “best practice” I was looking for but I might be wrong.

You can use udp with ntp server

Thank you for your quick answers, I’ll look into that.