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

时间:2012-01-19 17:26:56

标签: performance flash actionscript

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

1 个答案:

答案 0 :(得分:5)

var beforeTime = getTimer();
yourFunction();
var afterTime = getTimer();
var measure = afterTime - beforeTime;