= #JxnPortable\docs\programmer_examples\demos\NistDateTimeServer.jxn ...
!
! Connects to the NIST time server to read date and time info
!
@Date()  ! local computer time:
 = Mon Mar 23 13:11:22 CET 2020 (java.util.Date)
start = System.currentTimeMillis()
 = 1584965482168 (long)
! cs = @Socket( "ptbtime2.ptb.de", 13 )  ! ptb no more supports port 13
cs = @Socket( "time.nist.gov", 13 )
 = Socket[addr=time.nist.gov/132.163.97.4,port=13,localport=53483] (java.net.Socket)
is = @BufferedReader( @InputStreamReader( cs.getInputStream() ) )
 = java.io.BufferedReader@3a439b (java.io.BufferedReader)
is.readLine()
 =  (java.lang.String)
is.readLine()  ! NIST time:
 = 58931 20-03-23 12:11:22 50 0 0 418.3 UTC(NIST) *  (java.lang.String)
cs.close()
 = null
0.001 ( System.currentTimeMillis() - start )  ! response time for retrieving the info:
 = 0.563 (double)