19 posts
Posted 30 March 2016 - 11:22 AM
hi, im just wandering is there a timer already in CC?
and if so how do i use it?
7083 posts
Location
Tasmania (AU)
Posted 30 March 2016 - 11:35 AM
There are a few, actually. The two most important ones are
os.startTimer() and
os.clock().
The former fires an event after a specified time, which you can then
pull. Most CC scripts perform their timing this way.
The latter gets you the number of seconds the system has been on for. Handy if you want to measure how long a given action took.