2,733
edits
m (→maketimer()) |
Red Leader (talk | contribs) (→maketimer(): Doc simulatedTime member) |
||
Line 1,739: | Line 1,739: | ||
=== maketimer() === | === maketimer() === | ||
{{Nasal doc | {{Nasal doc | ||
|syntax = maketimer(interval[, self], function); | |syntax = maketimer(interval[, self], function); | ||
Line 1,762: | Line 1,750: | ||
* '''singleShot''': Bool showing whether the timer is only to be run once, or continuously until told to stop. Can be both set and read from (see examples). | * '''singleShot''': Bool showing whether the timer is only to be run once, or continuously until told to stop. Can be both set and read from (see examples). | ||
* '''isRunning''': Read-only bool telling whether the timer is currently running. | * '''isRunning''': Read-only bool telling whether the timer is currently running. | ||
* '''simulatedTime''': (FG 2017.1+; {{flightgear commit|0af316|t=commit}}) Bool telling whether the timer is using simulated time (which accounts for pause, etc.). Defaults to false (use real time). Can be both read and set. This cannot be changed while the timer is running. | |||
Unlike {{func link|settimer()}}, which it replaces, <code>maketimer()</code> provides more control over the timer. In addition, it can help reduce memory usage. | Unlike {{func link|settimer()}}, which it replaces, <code>maketimer()</code> provides more control over the timer. In addition, it can help reduce memory usage. | ||
|param1 = interval | |param1 = interval |