Measuring time taken to display an object in Flex
- by dta
For e.g.
function showIt():void {
something.visible = true;
}
function init():void {
time1 = flash.utils.getTimer();
showIt();
time2 = flash.utils.getTimer();
}
<mx:st id="something" visible="false"/>
<mx:Button click="init()"/>
In the above code, I want to measure the time taken to display st on screen.
Is it enough to compute time2 - time1?
Or should I put an event handler on render?
Or some other way?