You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

sleep.html 3.1 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!--
  2. Licensed to the Apache Software Foundation (ASF) under one or more
  3. contributor license agreements. See the NOTICE file distributed with
  4. this work for additional information regarding copyright ownership.
  5. The ASF licenses this file to You under the Apache License, Version 2.0
  6. (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. -->
  15. <html>
  16. <head>
  17. <link rel="stylesheet" type="text/css" href="../stylesheets/style.css">
  18. <title>Sleep Task</title>
  19. </head>
  20. <body>
  21. <h2><a name="sleep">Sleep</a></h2>
  22. <h3>Description</h3>
  23. <p> A task for sleeping a short period of time, useful when a build or deployment
  24. process requires an interval between tasks.</p>
  25. <h3>Parameters</h3>
  26. <table border="1" cellpadding="2" cellspacing="0">
  27. <tr>
  28. <td valign="top"><b>Attribute</b></td>
  29. <td valign="top"><b>Description</b></td>
  30. <td align="center" valign="top"><b>Required</b></td>
  31. </tr>
  32. <tr>
  33. <td valign="top">hours</td>
  34. <td valign="top">hours to to add to the sleep time</td>
  35. <td valign="top" align="center">No</td>
  36. </tr>
  37. <tr>
  38. <td valign="top">minutes</td>
  39. <td valign="top"> minutes to add to the sleep time</td>
  40. <td valign="top" align="center">No</td>
  41. </tr>
  42. <tr>
  43. <td valign="top">seconds</td>
  44. <td valign="top">seconds to add to the sleep time</td>
  45. <td align="center" valign="top">No</td>
  46. </tr>
  47. <tr>
  48. <td valign="top">milliseconds</td>
  49. <td valign="top">milliseconds to add to the sleep time</td>
  50. <td align="center" valign="top">No</td>
  51. </tr>
  52. <tr>
  53. <td valign="top">failonerror</td>
  54. <td valign="top">flag controlling whether to break the build on an error.
  55. </td>
  56. <td align="center" valign="top">No</td>
  57. </tr>
  58. </table>
  59. <p>The sleep time is the sum of specified values, hours, minutes seconds and milliseconds.
  60. A negative value can be supplied to any of them provided the total sleep time
  61. is positive</p>
  62. <p>Note that sleep times are always hints to be interpred by the OS how it feels
  63. - small times may either be ignored or rounded up to a minimum timeslice. Note
  64. also that the system clocks often have a fairly low granularity too, which complicates
  65. measuring how long a sleep actually took.</p>
  66. <h3>Examples</h3>
  67. <pre> &lt;sleep milliseconds=&quot;10&quot;/&gt;</pre>
  68. Sleep for about 10 mS.
  69. <pre> &lt;sleep seconds=&quot;2&quot;/&gt;</pre>
  70. Sleep for about 2 seconds.
  71. <pre> &lt;sleep hours=&quot;1&quot; minutes=&quot;-59&quot; seconds=&quot;-58&quot;/&gt;</pre>
  72. <p>Sleep for one hour less 59:58, or two seconds again </p>
  73. <pre> &lt;sleep/&gt;</pre>
  74. Sleep for no time at all. This may yield the CPU time to another thread or process.
  75. </body>
  76. </html>