Networking_TimeSync_SetEnabled Function
Header: #include <applibs/networking.h>
Enables or disables the time-sync service.
The changes take effect immediately without a device reboot and persist through device reboots. The time-sync service is then configured as requested at boot time. This function allows applications to override the default behavior, which is to enable time-sync at boot time.
int Networking_TimeSync_SetEnabled(bool enabled);
Parameters
enabled
true to enable the time-sync service; false to disable it.
Errors
Returns -1 if an error is encountered and sets errno
to the error value.
EACCES: the calling application doesn't have the TimeSyncConfig capability.
EAGAIN: the networking stack isn't ready.
Any other errno
may also be specified; such errors aren't deterministic and the same behavior might not be retained through system updates.
Return value
Returns 0 for success, or -1 for failure, in which case errno
will be set to the error value.
Application manifest requirements
The application manifest must include the TimeSyncConfig capability.