Dear admin:
How to get the accurate run time interval for every function(i.e, sysCall_sensing) in scene script?
I have try getSimulationTime in one function, the delta time is zero. For the getSimulationTimeStep?
Best Wishes.
Get the run time interval for every functions in scene
Re: Get the run time interval for every functions in scene
Hello,
try with:
Cheers
try with:
Code: Select all
function sysCall_sensing()
local startTime=sim.getSystemTimeInMs(-1)
-- Do something here
print(string.format("Time spent: %i [ms]",math.floor(sim.getSystemTimeInMs(startTime))))
end