-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Timer (imandrakit.Imandrakit_thread.Timer)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">imandrakit</a> » <a href="../index.html">Imandrakit_thread</a> » Timer</nav><header class="odoc-preamble"><h1>Module <code><span>Imandrakit_thread.Timer</span></code></h1><p>Timer.</p><p>Keep track of multiple timers.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span><span>{</span></code><ol><li id="type-t.run_after_s" class="def record field anchored"><a href="#type-t.run_after_s" class="anchor"></a><code><span>run_after_s : <span>float <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p><code>run_after_s t f</code> waits <code>t</code> seconds and then runs <code>f</code></p><span class="comment-delim">*)</span></div></li><li id="type-t.run_every_s" class="def record field anchored"><a href="#type-t.run_every_s" class="anchor"></a><code><span>run_every_s : <span><span class="optlabel">?initial</span>:float <span class="arrow">-></span></span> <span>float <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p><code>run_every ~initial t f</code> waits <code>initial</code> seconds and then runs <code>f</code> every <code>t</code> seconds</p><span class="comment-delim">*)</span></div></li><li id="type-t.terminate" class="def record field anchored"><a href="#type-t.terminate" class="anchor"></a><code><span>terminate : <span>unit <span class="arrow">-></span></span> unit;</span></code></li></ol><code><span>}</span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Stop_timer"><a href="#exception-Stop_timer" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Stop_timer</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run_after_s"><a href="#val-run_after_s" class="anchor"></a><code><span><span class="keyword">val</span> run_after_s : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>float <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p><code>run_after_s t f</code> waits <code>t</code> seconds and then runs <code>f</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run_every_s"><a href="#val-run_every_s" class="anchor"></a><code><span><span class="keyword">val</span> run_every_s : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><span class="optlabel">?initial</span>:float <span class="arrow">-></span></span> <span>float <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p><code>run_every ~initial t f</code> waits <code>initial</code> seconds and then runs <code>f()</code> every <code>t</code> seconds. <code>f ()</code> can raise <code>Stop_timer</code> to stop the loop.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span>unit <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-terminate"><a href="#val-terminate" class="anchor"></a><code><span><span class="keyword">val</span> terminate : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html> | ||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Timer (imandrakit.Imandrakit_thread.Timer)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">imandrakit</a> » <a href="../index.html">Imandrakit_thread</a> » Timer</nav><header class="odoc-preamble"><h1>Module <code><span>Imandrakit_thread.Timer</span></code></h1><p>Timer.</p><p>Keep track of multiple timers, using a background thread. The timer is thread-safe. It runs callbacks from within its own background thread.</p></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span><span> = </span><span>{</span></code><ol><li id="type-t.run_after_s" class="def record field anchored"><a href="#type-t.run_after_s" class="anchor"></a><code><span>run_after_s : <span>float <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p><code>run_after_s t f</code> waits <code>t</code> seconds and then runs <code>f</code></p><span class="comment-delim">*)</span></div></li><li id="type-t.run_every_s" class="def record field anchored"><a href="#type-t.run_every_s" class="anchor"></a><code><span>run_every_s : <span><span class="optlabel">?initial</span>:float <span class="arrow">-></span></span> <span>float <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit;</span></code><div class="def-doc"><span class="comment-delim">(*</span><p><code>run_every ~initial t f</code> waits <code>initial</code> seconds and then runs <code>f</code> every <code>t</code> seconds</p><span class="comment-delim">*)</span></div></li><li id="type-t.terminate" class="def record field anchored"><a href="#type-t.terminate" class="anchor"></a><code><span>terminate : <span>unit <span class="arrow">-></span></span> unit;</span></code></li></ol><code><span>}</span></code></div></div><div class="odoc-spec"><div class="spec exception anchored" id="exception-Stop_timer"><a href="#exception-Stop_timer" class="anchor"></a><code><span><span class="keyword">exception</span> </span><span><span class="exception">Stop_timer</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run_after_s"><a href="#val-run_after_s" class="anchor"></a><code><span><span class="keyword">val</span> run_after_s : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>float <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p><code>run_after_s t f</code> waits <code>t</code> seconds and then runs <code>f</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-run_every_s"><a href="#val-run_every_s" class="anchor"></a><code><span><span class="keyword">val</span> run_every_s : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><span class="optlabel">?initial</span>:float <span class="arrow">-></span></span> <span>float <span class="arrow">-></span></span> <span><span>(<span>unit <span class="arrow">-></span></span> unit)</span> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p><code>run_every ~initial t f</code> waits <code>initial</code> seconds and then runs <code>f()</code> every <code>t</code> seconds. <code>f ()</code> can raise <code>Stop_timer</code> to stop the loop.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create : <span>unit <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-terminate"><a href="#val-terminate" class="anchor"></a><code><span><span class="keyword">val</span> terminate : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> unit</span></code></div></div></div></body></html> |
Oops, something went wrong.