Difference between revisions of "Category:timer"

From Inspired-Lua Wiki
Jump to navigation Jump to search
m
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
*'''[[timer.start]]'''(time) : Starts the timer with the given ''time'' (in seconds)
+
== Description ==
 +
Each script application has one timer at its disposal.<br />
 +
The resolution of the timer depends on the platform. It is about 0.01 seconds on the hand-held device.
  
*'''[[timer.getMilliSecCounter]]'''() : Returns the value of the milliseconds elapsed since the calculator's last boot.
+
The script application should implement the “on.timer()” function to respond to timer ticks.
 +
The timer continues to send ticks to the script application even when its window is not visible on the screen.
  
 +
The timer is automatically stopped when the document containing the script application is closed or if the script application is deleted.
 +
 +
See an example at https://www.inspired-lua.org/index.php/2011/05/23/linking-events/
 +
 +
== Quick Overview ==
 +
*'''[[timer.start]]'''(period) : Starts the timer with the given ''period'' (in seconds. minimum = 0.01)<br />
 +
*'''[[timer.getMilliSecCounter]]'''() : Returns the value of the milliseconds elapsed since the calculator's last boot.<br />
 
*'''[[timer.stop]]'''() : Stops the timer.
 
*'''[[timer.stop]]'''() : Stops the timer.

Latest revision as of 14:40, 5 February 2023

Description

Each script application has one timer at its disposal.
The resolution of the timer depends on the platform. It is about 0.01 seconds on the hand-held device.

The script application should implement the “on.timer()” function to respond to timer ticks. The timer continues to send ticks to the script application even when its window is not visible on the screen.

The timer is automatically stopped when the document containing the script application is closed or if the script application is deleted.

See an example at https://www.inspired-lua.org/index.php/2011/05/23/linking-events/

Quick Overview

  • timer.start(period) : Starts the timer with the given period (in seconds. minimum = 0.01)
  • timer.getMilliSecCounter() : Returns the value of the milliseconds elapsed since the calculator's last boot.
  • timer.stop() : Stops the timer.

Pages in category "timer"

The following 4 pages are in this category, out of 4 total.