mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-12 14:48:40 +01:00
84 lines
3.0 KiB
HTML
84 lines
3.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
|
|
<title>Timer Class – Wren</title>
|
|
<script type="application/javascript" src="../../../prism.js" data-manual></script>
|
|
<script type="application/javascript" src="../../../wren.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="../../../prism.css" />
|
|
<link rel="stylesheet" type="text/css" href="../../../style.css" />
|
|
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic,700italic|Source+Code+Pro:400|Lato:400|Sanchez:400italic,400' rel='stylesheet' type='text/css'>
|
|
<!-- Tell mobile browsers we're optimized for them and they don't need to crop
|
|
the viewport. -->
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
|
|
</head>
|
|
<body id="top" class="module">
|
|
<header>
|
|
<div class="page">
|
|
<div class="main-column">
|
|
<h1><a href="../../../">wren</a></h1>
|
|
<h2>a classy little scripting language</h2>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<div class="page">
|
|
<nav class="big">
|
|
<a href="../../../"><img src="../../../wren.svg" class="logo"></a>
|
|
<ul>
|
|
<li><a href="../../">Back to Wren CLI</a></li>
|
|
<li><a href="../">Back to CLI Modules</a></li>
|
|
<li><a href="./">timer module</a></li>
|
|
</ul>
|
|
<section>
|
|
<h2>timer classes</h2>
|
|
<ul>
|
|
<li><a href="timer.html">Timer</a></li>
|
|
</ul>
|
|
</section>
|
|
</nav>
|
|
<nav class="small">
|
|
<table>
|
|
<tr>
|
|
<td><a href="../">Back to CLI Modules</a></td>
|
|
<td><a href="./">timer module</a></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2"><h2>timer classes</h2></td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<ul>
|
|
<li><a href="timer.html">Timer</a></li>
|
|
</ul>
|
|
</td>
|
|
<td>
|
|
<ul>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</nav>
|
|
<main>
|
|
<h1>Timer Class</h1>
|
|
<h2>Static Method <a href="#static-method" name="static-method" class="header-anchor">#</a></h2>
|
|
<h3>Timer.<strong>sleep</strong>(milliseconds) <a href="#timer.sleep(milliseconds)" name="timer.sleep(milliseconds)" class="header-anchor">#</a></h3>
|
|
<p>Suspends the current fiber for the given number of milliseconds. It is a runtime error if this is not a non-negative number.</p>
|
|
<p>This method is often used in conjunction with the Scheduler class which runs any scheduled tasks in separate fibers whilst the current fiber is sleeping.</p>
|
|
<p>Note that this method also suspends the System.clock method which will not give the correct running time for a program as a result.</p>
|
|
</main>
|
|
</div>
|
|
<footer>
|
|
<div class="page">
|
|
<div class="main-column">
|
|
<p>Wren lives
|
|
<a href="https://github.com/wren-lang/wren">on GitHub</a>
|
|
— Made with ❤ by
|
|
<a href="http://journal.stuffwithstuff.com/">Bob Nystrom</a> and
|
|
<a href="https://github.com/wren-lang/wren/blob/main/AUTHORS">friends</a>.
|
|
</p>
|
|
<div class="main-column">
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|