Check out the SNTP client code at:
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/SntpClient.java
Check out the SNTP client code at:
https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/net/SntpClient.java