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 2.7 KiB

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