Author: jkf Date: Sun Sep 23 07:55:49 2007 New Revision: 578575 URL: http://svn.apache.org/viewvc?rev=578575&view=rev Log: Watchdog may have yield negative wait time.
Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/Watchdog.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/Watchdog.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/Watchdog.java?rev=578575&r1=578574&r2=578575&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/util/Watchdog.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/Watchdog.java Sun Sep 23 07:55:49 2007 @@ -109,12 +109,13 @@ * has been interrupted, the watch dog listeners are informed. */ public synchronized void run() { - final long until = System.currentTimeMillis() + timeout; - long now = until - 1; + long now = System.currentTimeMillis(); + final long until = now + timeout; + try { while (!stopped && until > now) { - now = System.currentTimeMillis(); wait(until - now); + now = System.currentTimeMillis(); } } catch (InterruptedException e) { // Ignore exception --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]