[14627] | 1 | <html>
|
---|
| 2 |
|
---|
| 3 | <head>
|
---|
| 4 | <title>Sleep Task</title>
|
---|
| 5 | <link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
|
---|
| 6 | </head>
|
---|
| 7 |
|
---|
| 8 | <body>
|
---|
| 9 |
|
---|
| 10 | <h2><a name="sleep">Sleep</a></h2>
|
---|
| 11 | <h3>Description</h3>
|
---|
| 12 | <p> A task for sleeping a short period of time, useful when a build or deployment
|
---|
| 13 | process requires an interval between tasks.</p>
|
---|
| 14 |
|
---|
| 15 | <h3>Parameters</h3>
|
---|
| 16 | <table border="1" cellpadding="2" cellspacing="0">
|
---|
| 17 | <tr>
|
---|
| 18 | <td valign="top"><b>Attribute</b></td>
|
---|
| 19 | <td valign="top"><b>Description</b></td>
|
---|
| 20 | <td align="center" valign="top"><b>Required</b></td>
|
---|
| 21 | </tr>
|
---|
| 22 | <tr>
|
---|
| 23 | <td valign="top">hours</td>
|
---|
| 24 | <td valign="top">hours to to add to the sleep time</td>
|
---|
| 25 | <td valign="top" align="center">No</td>
|
---|
| 26 | </tr>
|
---|
| 27 | <tr>
|
---|
| 28 | <td valign="top">minutes</td>
|
---|
| 29 | <td valign="top"> minutes to add to the sleep time</td>
|
---|
| 30 | <td valign="top" align="center">No</td>
|
---|
| 31 | </tr>
|
---|
| 32 | <tr>
|
---|
| 33 | <td valign="top">seconds</td>
|
---|
| 34 | <td valign="top">seconds to add to the sleep time</td>
|
---|
| 35 | <td align="center" valign="top">No</td>
|
---|
| 36 | </tr>
|
---|
| 37 | <tr>
|
---|
| 38 | <td valign="top">milliseconds</td>
|
---|
| 39 | <td valign="top">milliseconds to add to the sleep time</td>
|
---|
| 40 | <td align="center" valign="top">No</td>
|
---|
| 41 | </tr>
|
---|
| 42 | <tr>
|
---|
| 43 | <td valign="top">failonerror</td>
|
---|
| 44 | <td valign="top">flag controlling whether to break the build on an error.
|
---|
| 45 | </td>
|
---|
| 46 | <td align="center" valign="top">No</td>
|
---|
| 47 | </tr>
|
---|
| 48 | </table>
|
---|
| 49 | <p>The sleep time is the sum of specified values, hours, minutes seconds and milliseconds.
|
---|
| 50 | A negative value can be supplied to any of them provided the total sleep time
|
---|
| 51 | is positive</p>
|
---|
| 52 | <p>Note that sleep times are always hints to be interpred by the OS how it feels
|
---|
| 53 | - small times may either be ignored or rounded up to a minimum timeslice. Note
|
---|
| 54 | also that the system clocks often have a fairly low granularity too, which complicates
|
---|
| 55 | measuring how long a sleep actually took.</p>
|
---|
| 56 | <h3>Examples</h3>
|
---|
| 57 | <pre> <sleep milliseconds="10"/></pre>
|
---|
| 58 | Sleep for about 10 mS.
|
---|
| 59 | <pre> <sleep seconds="2"/></pre>
|
---|
| 60 | Sleep for about 2 seconds.
|
---|
| 61 | <pre> <sleep hours="1" minutes="-59" seconds="-58"/></pre>
|
---|
| 62 | <p>Sleep for one hour less 59:58, or two seconds again </p>
|
---|
| 63 | <pre> <sleep/></pre>
|
---|
| 64 | Sleep for no time at all. This may yield the CPU time to another thread or process.
|
---|
| 65 | <hr>
|
---|
| 66 |
|
---|
| 67 | <p align="center">Copyright © 2001-2002,2004 The Apache Software Foundation. All rights
|
---|
| 68 | Reserved.</p>
|
---|
| 69 |
|
---|
| 70 | </body>
|
---|
| 71 | </html>
|
---|
| 72 |
|
---|