It looks like you're new here. If you want to get involved, click one of these buttons!
timer = Timer.new(100, 10) function onTimer(e) print(os.timer()) end timer:addEventListener(Event.TIMER, onTimer) timer:start() |
For me it is not problem now, because i check current position of sound in my app. But may be you now how to fix this?
532.43867148027
532.53866848176
532.63867357923
532.7386786767
532.83868437387
532.93868437387
533.05472820008
533.1547488898
533.25475128861
533.37170576224
Comments
but seriously, it probably could depend on performance of the app. If app microfreezes or gets blocked for some milliseconds, timer is delayed.
532.4386
532.5386
532.6386
532.7386
532.8386
532.9386
533.0547 <- garbage collection probably occurred
533.1547
533.2547
533.3717 <- garbage collection probably occurred
If you want that precise of a timer you probably should calculate the delta every time.
My apps: http://www.yummyyellow.com
Likes: duke2017