Measuring time taken to display an object in Flex

Posted by dta on Stack Overflow See other posts from Stack Overflow or by dta
Published on 2010-05-03T12:13:47Z Indexed on 2010/05/03 12:18 UTC
Read the original article Hit count: 236

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about flex

Related posts about actionscript-3