Here is what I have worked out so far:
I declare some public variables.
public var now: Date = new Date;
public var beg_tck: uint;
public var end_tck: uint;
I then start my app in debug mode.
I then click a button and load the beg_tck variable:
protected function btnGo_clickHandler(event:MouseEvent):void
beg_tck = now.getTime();
... "hit and stay at debug stop"...
I go over to the debug screen in FlashBuilder 4 and wait about 3 seconds, then I resume with F8
I have a updateComplete which loads the end_tck, and displays their contents.
protected function grdSBJs_updateCompleteHandler(event:FlexEvent):void
end_tck = now.getTime(); // - beg_tck
lblResponseTime.text = 'Response time: ' + String((end_tck)) + ' beg_tck: ' + String(beg_tck);
For some reason beg_tck and end_tck are ALWAYS THE SAME.
Why is this happening? Even though I've held back processing for 3 seconds, the now.getTime() is putting the exact same number into beg_tck and end_tck.
Thanks in advance for any help you can provide.
Because now still refers to the same object (the one that is created when your component is initialized). Try new Date().getTime().