Their descriptions in the reference seem identical.
What is the difference between the two?
Thanks. [import]uid: 39031 topic_id: 12391 reply_id: 312391[/import]
event.time is a property
system.getTimer() is a function
both returns same value
[lua]function printTimeSinceStart( event )
print("system.getTimer : "… system.getTimer() )
print ("event.time : "…event.time)
end
timer.performWithDelay(1000, printTimeSinceStart, 10)
–Runtime:addEventListener(“enterFrame”, printTimeSinceStart)[/lua] [import]uid: 71210 topic_id: 12391 reply_id: 45163[/import]
Got it. Thanks! [import]uid: 39031 topic_id: 12391 reply_id: 45271[/import]
What I would really like to know - in the context of optimizing - is if one of either is faster… I call these functions (well, one of 'em) every frame to get timebased animation, and I have been wondering which one I should choose.
Is there someone (from Ansca or other) who can answer this??
thanks,
Thomas [import]uid: 70134 topic_id: 12391 reply_id: 47178[/import]