chronoman
Version:
Utility class to simplify use of timers created by setTimeout
348 lines (116 loc) • 6.18 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Timer</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Timer</h1>
<section>
<header>
<h2>
Timer
</h2>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="Timer"><span class="type-signature"></span>new Timer<span class="signature">(<span class="optional">initValue</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Utility class to simplify use of timers created by setTimeout.
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>initValue</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Specifies initial property values. Keys are property names, their values are values of corresponding properties.
The following keys (properties) can be specified:
<table>
<tr>
<th>Name</th>
<th>Type</th>
<th>Description</th>
</tr>
<tr>
<td>action</td>
<td>Function</td>
<td>Related action that should be executed after time period is elapsed.</td>
</tr>
<tr>
<td>active</td>
<td>Boolean</td>
<td>Whether timer usage should be immediately started.</td>
</tr>
<tr>
<td>period</td>
<td>Integer</td>
<td>Time period in milliseconds that is used to schedule related action execution.</td>
</tr>
<tr>
<td>recurrent</td>
<td>Boolean</td>
<td>Whether related action should be executed repeatedly.</td>
</tr>
</table></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chronoman.js.html">chronoman.js</a>, <a href="chronoman.js.html#line4">line 4</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="_period"><span class="type-signature"><protected> </span>_period<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Time period in milliseconds.
A related action will be executed when the period is elapsed.
</div>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li>Denis Sikuler</li>
</ul>
</dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chronoman.js.html">chronoman.js</a>, <a href="chronoman.js.html#line83">line 83</a>
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="dispose"><span class="type-signature"></span>dispose<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
Free resources that are allocated for object.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="chronoman.js.html">chronoman.js</a>, <a href="chronoman.js.html#line310">line 310</a>
</li></ul></dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-chronoman.html">chronoman</a></li></ul><h3>Classes</h3><ul><li><a href="Timer_.html">Timer</a></li></ul>
</nav>
<br clear="both">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.0</a> on Mon Aug 12 2013 12:42:06 GMT+0400 (MSK)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>