ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject [SUBMIT] Sleep task
Date Thu, 03 May 2001 06:57:12 GMT
I am sure that one of these exists and was posted before, but couldn't find
it when I needed to wait a while for something to sort itself out during
deployment

So here is a task to sleep for a while, where "a while" is defined as any
number of milliseconds greater than or equal to zero. Some higher level
times are given, seconds being the most useful. sub second delays are very
subject to OS and JVM whims to be recommended. You can send negative numbers
too, but the total delay must be in the future rather than the past, pending
some fundamental enhancements in speculative instruction execution :-)

    <sleep />
    <sleep milliseconds="10"/>
    <sleep seconds="2"/>
    <sleep hours="1" minutes="-59" seconds="-58"/>
    <sleep hours="1" />

No unusual dependencies on j2ee, jaxp or xml parsers, no funny behaviour
related to remote web servers and an nice simple test harness which may
break if some platforms do return earlier than multi-second sleep requests
ask for, or just have a broken clock.

[I would have include the patch for default properties, but changing doesnt
seem to work for me. I am doing something wrong]

-Steve



Mime
View raw message