ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samson, Lyndon [IT]" <lyndon.sam...@ssmb.com>
Subject RE: Ant sleep?
Date Thu, 21 Jun 2001 09:39:18 GMT
For future reference I worked something out. It may not be the best way but
it works.


 <target name="wait" >

        <script language="javascript"> <![CDATA[
 
            t = new Date().getTime();
  	      w = parseInt([YOUR PROJECT NAME HERE].getProperty("time")) ;

            t2 = new Date().getTime();
            while ( t2 - t < w ) {
                t2 =new Date().getTime();
            }

        ]]> </script>
    </target>

    <target name="waitcall" >
        <antcall target="wait">
            <param name="time" value="2000"/>
        </antcall>
    </target>

-----Original Message-----
From: Samson, Lyndon [IT] [mailto:lyndon.samson@ssmb.com]
Sent: Thursday, June 21, 2001 10:15 AM
To: 'ant-user@jakarta.apache.org'
Subject: Ant sleep?


After stopping WebLogic5.1 I need my build file to wait 30 or so seconds.

Ant doesn't seem to have a sleep command built in, is there a way of
simulating it
with a script?

thx

Mime
View raw message