Skip to content

Commit 2d8b37a

Browse files
committed
Document timers
1 parent 25f71ca commit 2d8b37a

File tree

2 files changed

+53
-2
lines changed

2 files changed

+53
-2
lines changed

_layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ <h1><img alt="EVE" src="https://witheve.github.io/assets/images/wordmark.svg" />
6969
<li><a href="{{ site.url }}/v0.3/handbook/libraries/stdlib/#html">HTML</a></li>
7070
<li><a href="{{ site.url }}/v0.3/handbook/libraries/stdlib/#canvas">Canvas</a></li>
7171
<li><a href="{{ site.url }}/v0.3/handbook/libraries/stdlib/#ui">UI</a></li>
72+
<li><a href="{{ site.url }}/v0.3/handbook/libraries/stdlib/#system">System</a></li>
7273

7374

7475
</ul>

v0.3/handbook/libraries/stdlib.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,14 +1182,14 @@ commit
11821182
11831183
<tr>
11841184
<td>
1185-
<ui>
1185+
<ul>
11861186
<li><strong>children</strong> - (optional) - the children contained within the column or row</li>
11871187
<li><strong>style</strong> - (optional) - specific CSS styles can be defined, but must be entered as a subrecord</li>
11881188
<li><strong>text</strong> - (optional) - defines text within the column or row</li>
11891189
<li><strong>#</strong> - (optional) - any other tags on the record will be applied to the column or row as classes</li>
11901190
<li><strong>class</strong> - (optional) defines one or more classes for the element</li>
11911191
<li>Other attributes - (optional) - other attribute-value pairs will be applied directly to the column or row for integration with existing JS libraries or debugging</li>
1192-
</ui>
1192+
</ul>
11931193
</td>
11941194
<td><code>// creates 3 very wise divs in the browser stacked on top of one another
11951195
```
@@ -1400,3 +1400,53 @@ bind
14001400
</td>
14011401
</tr>
14021402
</table>
1403+
1404+
## System
1405+
1406+
The system library provides various system-level utilities for Eve.
1407+
1408+
<table class="libitem">
1409+
<tr>
1410+
<td colspan="2">
1411+
<b>#system/timer</b> - starts a timer at the specified resolution
1412+
</td>
1413+
</tr>
1414+
1415+
<tr>
1416+
<td>
1417+
<ul>
1418+
<li><strong>resultion</strong> - the frequency in milliseconds of the timer.</li>
1419+
<li><strong>year</strong> - (optional) - the current year</li>
1420+
<li><strong>month</strong> - (optional) - the current month (1 - 12)</li>
1421+
<li><strong>day</strong> - (optional) - the current day of the month (1 - 31)</li>
1422+
<li><strong>weeday</strong> - (optional) - the current day of the week (1 - 7, where 1 is Sunday)</li>
1423+
<li><strong>hours</strong> - (optional) - the current hour (0 - 23)</li>
1424+
<li><strong>minutes</strong> - (optional) - the current minute (0 - 59)</li>
1425+
<li><strong>seconds</strong> - (optional) - the current second (0 - 59)</li>
1426+
<li><strong>milliseconds</strong> - (optional) - the current millisecond (0 - 999)</li>
1427+
<li><strong>timestamp</strong> - (optional) - the current time represented as the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC</li>
1428+
<li><strong>frame</strong> - (optional) - the number of frames elapsed since the start of the timer</li>
1429+
</ul>
1430+
</td>
1431+
<td>
1432+
<code>
1433+
Commits a timer that ticks every 1000 milliseconds
1434+
1435+
```
1436+
commit
1437+
[#system/timer resolution: 1000]
1438+
```
1439+
1440+
Displays the current time
1441+
1442+
```
1443+
search
1444+
[#system/timer hours minutes seconds]
1445+
1446+
bind
1447+
[#ui/text text: "{{hours}}:{{minutes}}:{{seconds}}"]
1448+
```
1449+
</code>
1450+
</td>
1451+
</tr>
1452+
</table>

0 commit comments

Comments
 (0)