2006-09-11 04:19:00 +00:00
|
|
|
<!--
|
|
|
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
contributor license agreements. See the NOTICE file distributed with
|
|
|
|
this work for additional information regarding copyright ownership.
|
|
|
|
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
|
|
(the "License"); you may not use this file except in compliance with
|
|
|
|
the License. You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
-->
|
2001-06-21 10:19:12 +00:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
2005-04-29 18:58:16 +00:00
|
|
|
<link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
|
2002-02-03 22:00:42 +00:00
|
|
|
<title>Sleep Task</title>
|
2001-06-21 10:19:12 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
2018-01-22 23:52:21 +01:00
|
|
|
<h2 id="sleep">Sleep</h2>
|
2001-06-21 10:19:12 +00:00
|
|
|
<h3>Description</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>A task for sleeping a short period of time, useful when a build or deployment process requires an
|
|
|
|
interval between tasks.</p>
|
2001-06-21 10:19:12 +00:00
|
|
|
|
|
|
|
<h3>Parameters</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<table class="attr">
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-05-15 10:29:27 +02:00
|
|
|
<th scope="col">Attribute</th>
|
|
|
|
<th scope="col">Description</th>
|
|
|
|
<th scope="col">Required</th>
|
2001-06-21 10:19:12 +00:00
|
|
|
</tr>
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>hours</td>
|
|
|
|
<td>hours to to add to the sleep time</td>
|
|
|
|
<td>No</td>
|
2001-06-21 10:19:12 +00:00
|
|
|
</tr>
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>minutes</td>
|
|
|
|
<td>minutes to add to the sleep time</td>
|
|
|
|
<td>No</td>
|
2001-06-21 10:19:12 +00:00
|
|
|
</tr>
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>seconds</td>
|
|
|
|
<td>seconds to add to the sleep time</td>
|
|
|
|
<td>No</td>
|
2001-06-21 10:19:12 +00:00
|
|
|
</tr>
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>milliseconds</td>
|
|
|
|
<td>milliseconds to add to the sleep time</td>
|
|
|
|
<td>No</td>
|
2001-06-21 10:19:12 +00:00
|
|
|
</tr>
|
2018-01-22 23:52:21 +01:00
|
|
|
<tr>
|
2018-02-28 07:58:59 +01:00
|
|
|
<td>failonerror</td>
|
|
|
|
<td>flag controlling whether to break the build on an error</td>
|
|
|
|
<td>No</td>
|
2001-06-21 10:19:12 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>The sleep time is the sum of specified values, hours, minutes seconds and milliseconds. A
|
|
|
|
negative value can be supplied to any of them provided the total sleep time is positive</p>
|
|
|
|
<p>Note that sleep times are always hints to be interpreted by the OS how it feels—small times
|
|
|
|
may either be ignored or rounded up to a minimum timeslice. Note also that the system clocks often
|
|
|
|
have a fairly low granularity too, which complicates measuring how long a sleep actually took.</p>
|
2001-06-21 10:19:12 +00:00
|
|
|
<h3>Examples</h3>
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Sleep for about 10 ms.</p>
|
2018-05-15 09:51:58 +02:00
|
|
|
<pre><sleep milliseconds="10"/></pre>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Sleep for about 2 seconds.</p>
|
2018-05-15 09:51:58 +02:00
|
|
|
<pre><sleep seconds="2"/></pre>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Sleep for one hour less 59:58, or two seconds again.</p>
|
2018-05-15 09:51:58 +02:00
|
|
|
<pre><sleep hours="1" minutes="-59" seconds="-58"/></pre>
|
|
|
|
|
2018-02-28 07:58:59 +01:00
|
|
|
<p>Sleep for no time at all. This may yield the CPU time to another thread or process.</p>
|
2018-05-15 09:51:58 +02:00
|
|
|
<pre><sleep/></pre>
|
2001-06-21 10:19:12 +00:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|