diff options
| author | Ludvig Gunne Lindström <ludviggunnelindstrom@gmail.com> | 2026-07-17 11:43:24 +0200 |
|---|---|---|
| committer | Ludvig Gunne Lindström <ludviggunnelindstrom@gmail.com> | 2026-11-08 14:15:04 +0100 |
| commit | 039847a29868d335c08fe0a587260dffc71ca5c4 (patch) | |
| tree | e9d775090fef45ca51db576779fb373040d50e6a /doc/classes/timer.html | |
| download | melisma-modules-main.tar.gz | |
Diffstat (limited to 'doc/classes/timer.html')
| -rw-r--r-- | doc/classes/timer.html | 226 |
1 files changed, 226 insertions, 0 deletions
diff --git a/doc/classes/timer.html b/doc/classes/timer.html new file mode 100644 index 0000000..a6b16c8 --- /dev/null +++ b/doc/classes/timer.html @@ -0,0 +1,226 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> +<head> + <title>Melisma modules</title> + <link rel="stylesheet" href="../ldoc_fixed.css" type="text/css" /> +</head> +<body> + +<div id="container"> + +<div id="product"> + <div id="product_logo"></div> + <div id="product_name"><big><b></b></big></div> + <div id="product_description"></div> +</div> <!-- id="product" --> + + +<div id="main"> + + +<!-- Menu --> + +<div id="navigation"> +<p><a href="/melisma-modules">Back to repository</a></p> +<br/> +<h1>Melisma modules</h1> + + +<ul> + <li><a href="../index.html">Index</a></li> +</ul> + +<h2>Contents</h2> +<ul> +<li><a href="#Functions">Functions</a></li> +<li><a href="#Methods">Methods</a></li> +</ul> + + +<h2>Classes</h2> +<ul class="nowrap"> + <li><a href="../classes/buffer.html">buffer</a></li> + <li><a href="../classes/delay.html">delay</a></li> + <li><a href="../classes/gain.html">gain</a></li> + <li><a href="../classes/interp.html">interp</a></li> + <li><a href="../classes/ladspa.html">ladspa</a></li> + <li><a href="../classes/mixer.html">mixer</a></li> + <li><a href="../classes/nullsink.html">nullsink</a></li> + <li><a href="../classes/oscil.html">oscil</a></li> + <li><a href="../classes/pan.html">pan</a></li> + <li><a href="../classes/playback.html">playback</a></li> + <li><a href="../classes/sample.html">sample</a></li> + <li><a href="../classes/serial.html">serial</a></li> + <li><strong>timer</strong></li> +</ul> +<h2>Modules</h2> +<ul class="nowrap"> + <li><a href="../modules/biquad.html">biquad</a></li> + <li><a href="../modules/expression.html">expression</a></li> + <li><a href="../modules/fs.html">fs</a></li> + <li><a href="../modules/keycallback.html">keycallback</a></li> + <li><a href="../modules/udp.html">udp</a></li> +</ul> + +</div> + +<div id="content"> + +<h1>Class <code>timer</code></h1> +<p>Time measurement.</p> +<p> + + + +<pre> +<span class="keyword">local</span> mtimer = <span class="global">require</span> <span class="string">'melisma.timer'</span> +<span class="keyword">local</span> mkeycallback = <span class="global">require</span> <span class="string">'melisma.keycallback'</span> + +<span class="keyword">local</span> timer = mtimer.<span class="function-name">init</span>() +timer:<span class="function-name">start</span>() + +mkeycallback.<span class="function-name">set</span>(<span class="keyword">function</span>() + <span class="global">print</span>(timer:<span class="function-name">read</span>()) + timer:<span class="function-name">reset</span>() +<span class="keyword">end</span>) +</pre> + +</p> + + +<h2><a href="#Functions">Functions</a></h2> +<table class="function_list"> + <tr> + <td class="name" nowrap><a href="#timer.init">timer.init()</a></td> + <td class="summary">Create a new timer.</td> + </tr> +</table> +<h2><a href="#Methods">Methods</a></h2> +<table class="function_list"> + <tr> + <td class="name" nowrap><a href="#timer:read">timer:read()</a></td> + <td class="summary">Read timer.</td> + </tr> + <tr> + <td class="name" nowrap><a href="#timer:reset">timer:reset()</a></td> + <td class="summary">Reset timer.</td> + </tr> + <tr> + <td class="name" nowrap><a href="#timer:start">timer:start()</a></td> + <td class="summary">Start timer.</td> + </tr> + <tr> + <td class="name" nowrap><a href="#timer:stop">timer:stop()</a></td> + <td class="summary">Stop timer.</td> + </tr> +</table> + +<br/> +<br/> + + + <h2 class="section-header "><a name="Functions"></a>Functions</h2> + Methods + <dl class="function"> + <dt> + <a name = "timer.init"></a> + <strong>timer.init()</strong> + </dt> + <dd> + Create a new timer. + + + + <h3>Returns:</h3> + <ol> + + <span class="types"><a class="type" href="../classes/timer.html#">timer</a></span> + + + + </ol> + + + + +</dd> +</dl> + <h2 class="section-header "><a name="Methods"></a>Methods</h2> + + <dl class="function"> + <dt> + <a name = "timer:read"></a> + <strong>timer:read()</strong> + </dt> + <dd> + Read timer. + + + + <h3>Returns:</h3> + <ol> + + <span class="types"><span class="type">number</span></span> + Elapsed seconds. + </ol> + + + + +</dd> + <dt> + <a name = "timer:reset"></a> + <strong>timer:reset()</strong> + </dt> + <dd> + Reset timer. + + + + + + + +</dd> + <dt> + <a name = "timer:start"></a> + <strong>timer:start()</strong> + </dt> + <dd> + Start timer. + + + + + + + +</dd> + <dt> + <a name = "timer:stop"></a> + <strong>timer:stop()</strong> + </dt> + <dd> + Stop timer. + + + + + + + +</dd> +</dl> + + +</div> <!-- id="content" --> +</div> <!-- id="main" --> +<div id="about"> +<i>generated by <a href="http://github.com/lunarmodules/LDoc">LDoc 1.5.0</a></i> +<i style="float:right;">Last updated 1980-01-01 00:00:00 </i> +</div> <!-- id="about" --> +</div> <!-- id="container" --> +</body> +</html> |
