Actionscript 2.0,测量函数执行时间?

Ant*_*and 1 flash performance actionscript

如何衡量在ActionScript 2.0中执行函数所需的时间?

AsT*_*rns 5

var beforeTime = getTimer();
yourFunction();
var afterTime = getTimer();
var measure = afterTime - beforeTime;
Run Code Online (Sandbox Code Playgroud)