Time synchronization between server and Internet using Java
I have an assign开发者_StackOverflow中文版ment for developing a messenger for 1 server and 3 clients. I am facing a problem with time synchronization: I have to synchronize the server time with the internet and then synchronize the clients also. How can I accomplish this?
Use NTP to synchronize the different clocks. You'll want an NTP library, perhaps this one.
See also
- Java NTP client
- Network Time Synchronization with Java
- Using Java to Query a Server for the Time
精彩评论