This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Sewbacca's profile picture

measure the time

Started by Sewbacca, 16 March 2016 - 12:05 PM
Sewbacca #1
Posted 16 March 2016 - 01:05 PM
I want to measure the time like:


local timer = os.createTimer()
while true do
  timer:resume()
  aSlowlyFunction(manny, arguments)
  timer:yield()
  print(timer.value)
  timer:reset()
end
Edited on 16 March 2016 - 12:06 PM
KingofGamesYami #2
Posted 16 March 2016 - 01:08 PM
So, os.clock.
Sewbacca #3
Posted 16 March 2016 - 01:47 PM
Thanks