Save This Page
Home » apache-log4j-1.2.15 » examples » ntp » [javadoc | source]
examples.ntp
public final class: NTPClient [javadoc | source]
java.lang.Object
   examples.ntp.NTPClient
This is an example program demonstrating how to use the NTPUDPClient class. This program sends a Datagram client request packet to a Network time Protocol (NTP) service port on a specified server, retrieves the time, and prints it to standard output along with the fields from the NTP message header (e.g. stratum level, reference id, poll interval, root delay, mode, ...) See the spec for details.

Usage: NTPClient
Example: NTPClient clock.psu.edu

Method from examples.ntp.NTPClient Summary:
main,   processResponse
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from examples.ntp.NTPClient Detail:
 public static final  void main(String[] args) 
 public static  void processResponse(TimeInfo info) 
    Process TimeInfo object and print its details.