ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umag...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs WaitFor.java
Date Thu, 06 Dec 2001 14:33:40 GMT
umagesh     01/12/06 06:33:40

  Modified:    src/main/org/apache/tools/ant/taskdefs WaitFor.java
  Log:
  Ensure maxWaitMIllis and checkEveryMillis results in proper values irrespective of the order
in which the setter methods are called.
  
  Revision  Changes    Path
  1.3       +6 -2      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/WaitFor.java
  
  Index: WaitFor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/WaitFor.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WaitFor.java	2001/12/05 20:22:19	1.2
  +++ WaitFor.java	2001/12/06 14:33:40	1.3
  @@ -85,7 +85,9 @@
   
   public class WaitFor extends ConditionBase {
       private long maxWaitMillis = 1000l * 60l * 3l; // default max wait time
  +    private long maxWaitMultiplier = 1l;
       private long checkEveryMillis = 500l;
  +    private long checkEveryMultiplier = 1l;
   
       /**
        * Set the maximum length of time to wait
  @@ -98,7 +100,7 @@
        * Set the max wait time unit
        */
       public void setMaxWaitUnit(Unit unit) {
  -        maxWaitMillis *= unit.getMultiplier();
  +        maxWaitMultiplier = unit.getMultiplier();
       }
   
       /**
  @@ -112,7 +114,7 @@
        * Set the check every time unit
        */
       public void setCheckEveryUnit(Unit unit) {
  -        checkEveryMillis *= unit.getMultiplier();
  +        checkEveryMultiplier = unit.getMultiplier();
       }
   
       /**
  @@ -128,6 +130,8 @@
           }
           Condition c = (Condition) getConditions().nextElement();
   
  +        maxWaitMillis *= maxWaitMultiplier;
  +        checkEveryMillis *= checkEveryMultiplier;
           long start = System.currentTimeMillis();
           long end = start + maxWaitMillis;
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message