Author: veithen Date: Sun Jan 4 12:05:26 2009 New Revision: 731350 URL: http://svn.apache.org/viewvc?rev=731350&view=rev Log: Repaired the measurement of the elapsed time which was accidentally broken by the change in r730880.
Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java?rev=731350&r1=731349&r2=731350&view=diff ============================================================================== --- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java (original) +++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/core/SocketRR.java Sun Jan 4 12:05:26 2009 @@ -105,11 +105,14 @@ */ public void run() { try { - // TODO: we should distinguish here between exceptions thrown when reading from the - // input stream and exceptions thrown in the pipeline - while (pipeline.readFrom(in) != -1) { - // Just loop - } + long start = System.currentTimeMillis(); + int c; + do { + // TODO: we should distinguish here between exceptions thrown when reading from the + // input stream and exceptions thrown in the pipeline + c = pipeline.readFrom(in); + elapsed = System.currentTimeMillis() - start; + } while (c != -1); } catch (Exception e) { e.printStackTrace(); } finally {