Project

General

Profile

Statistics
| Revision:

root / trunk / web / dojo / dojox / lang / aspect / profiler.js @ 12

History | View | Annotate | Download (658 Bytes)

1
/*
2
        Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
3
        Available via Academic Free License >= 2.1 OR the modified BSD license.
4
        see: http://dojotoolkit.org/license for details
5
*/
6

    
7

    
8
if(!dojo._hasResource["dojox.lang.aspect.profiler"]){
9
dojo._hasResource["dojox.lang.aspect.profiler"]=true;
10
dojo.provide("dojox.lang.aspect.profiler");
11
(function(){
12
var _1=dojox.lang.aspect,_2=0;
13
var _3=function(_4){
14
this.args=_4?[_4]:[];
15
this.inCall=0;
16
};
17
dojo.extend(_3,{before:function(){
18
if(!(this.inCall++)){
19
console.profile.apply(console,this.args);
20
}
21
},after:function(){
22
if(!--this.inCall){
23
}
24
}});
25
_1.profiler=function(_5){
26
return new _3(_5);
27
};
28
})();
29
}