I don’t understand how to use samples in LUA.
The SDK documentation says:
Suspect some code is running hot? Wrap it in an anonymous function and pass it to sample() like so:
sample("name of this sample", function()
-- nested for loops, lots of table creation, member access...
end)
I have a chunk of code I want to know how long it takes on the device to run. It’s a function calling a bunch of functions:
function updateCombatEnvironment()
advanceTime(10)
setupLightingConditions()
setupEnvironmentVariables()
setupRanges()
setupTacticalChartView()
setupTDCView()
end
What’s the syntax to sample the entire updateCombatEnvironment() function?