Changes

Jump to navigation Jump to search

timer.getMilliSecCounter

272 bytes added, 13:16, 25 May 2011
no edit summary
Line 16: Line 16:  
== Example  ==
 
== Example  ==
 
<syntaxhighlight>theTime = timer.getMilliSecCounter()</syntaxhighlight>
 
<syntaxhighlight>theTime = timer.getMilliSecCounter()</syntaxhighlight>
 +
 +
== Good to know ==
 +
In order to define a relative time origin, whether it's on calc or  in the emulator, this can be an example :
 +
 +
<source>function now()
 +
  local now = timer.getMilliSecCounter()
 +
    if now < 0 then
 +
      now = now + 2^31
 +
    end
 +
  return now
 +
end</source>
    
== See also  ==
 
== See also  ==

Navigation menu