source: release-kits/lirk3/resources/gs3-release-maker/ant/docs/manual/CoreTasks/sleep.html@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 2.4 KB
Line 
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> &lt;sleep milliseconds=&quot;10&quot;/&gt;</pre>
58Sleep for about 10 mS.
59<pre> &lt;sleep seconds=&quot;2&quot;/&gt;</pre>
60Sleep for about 2 seconds.
61<pre> &lt;sleep hours=&quot;1&quot; minutes=&quot;-59&quot; seconds=&quot;-58&quot;/&gt;</pre>
62<p>Sleep for one hour less 59:58, or two seconds again </p>
63<pre> &lt;sleep/&gt;</pre>
64Sleep for no time at all. This may yield the CPU time to another thread or process.
65<hr>
66
67<p align="center">Copyright &copy; 2001-2002,2004 The Apache Software Foundation. All rights
68Reserved.</p>
69
70</body>
71</html>
72
Note: See TracBrowser for help on using the repository browser.