code: private long doPing(final Connection connection) throws DevFailed {
  		checkIfTango(connection, "ping");
  
  		build_connection(connection);
  
  		final long t0 = System.currentTimeMillis();
  		try {
  	    	connection.device.ping();
  		} catch (final DevFailed e) {
  	    	final String reason = "TangoApi_CANNOT_PING_DEVICE";
  	    	final String desc = "Cannot ping " + connection.devname;
  	    	final String origin = "Connection.ping()";
  	    	Except.throw_connection_failed(e, reason, desc, origin);
  		} catch (final Exception e) {
  	    	ApiUtilDAODefaultImpl.removePendingRepliesOfDevice(connection);
  	    	throw_dev_failed(connection, e, "ping", false);
  		}
  
  		final long t1 = System.currentTimeMillis();
  		return (int) (t1 - t0) * 1000; // Set as micro seconds
      }
docs: ===========================================================