= #JxnPortable/docs/programmer_examples/demos/PtbDateTimeServer.jxn
!
! Connects to the PTB time server to read date and time info
!
@Date()  ! local computer time:
 = Tue Jul 31 18:15:00 CEST 2018 (java.util.Date)
start = System.currentTimeMillis()
 = 1533053700704 (long)
cs = @Socket( "ptbtime2.ptb.de", 13 )
 = Socket[addr=ptbtime2.ptb.de/192.53.103.104,port=13,localport=52752] (java.net.Socket)
is = @BufferedReader( @InputStreamReader( cs.getInputStream() ) )
 = java.io.BufferedReader@3a439b (java.io.BufferedReader)
is.readLine()  ! PTB time:
 = 31 JUL 2018 16:15:01 UTC (java.lang.String)
cs.close()
 = null
0.001 ( System.currentTimeMillis() - start )  ! response time for retrieving the info:
 = 0.67 (double)