TimeTCPClient client = new TimeTCPClient();
try
{
// We want to timeout if a response takes longer than 60 seconds
client.setDefaultTimeout(60000);
client.connect(InetAddress.getLocalHost(), _port);
clientTime = client.getDate().getTime();
time = System.currentTimeMillis();
} finally
{
client.disconnect();