private var time1:Number;
private var time2:Number;
private function toMeasure():void
{
for (var i:int = 0;i<30000;i++)
{
trace (i);
}
}
protected function main():void
{
time1= new Date().time;
toMeasure();
time2= new Date().time;
trace ("ms:"+(time2-time1));
}