Benchmarking lua code

Is there a way to benchmark LUA code on the E1? I tried using os.clock() but that one is unavailable.

Right now, I’m commenting out code if that’s easily possible without breaking stuff but I wish there was a quicker and safer way.

you can use controller.uptime(). It returns time elapsed since the system start up (in msecs).


Thanks, that’s what I was looking for!

Is there a way to benchmark other parts of the system like how long it took for an incoming message to get processed until it was made available to the lua script or how long it took to make a control visible on the screen?