root / trunk / web / dojo / dojox / lang / aspect / timer.js @ 12
History | View | Annotate | Download (622 Bytes)
| 1 | 9 | andrej.cim | /*
|
|---|---|---|---|
| 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.timer"]){ |
||
| 9 | dojo._hasResource["dojox.lang.aspect.timer"]=true; |
||
| 10 | dojo.provide("dojox.lang.aspect.timer");
|
||
| 11 | (function(){
|
||
| 12 | var _1=dojox.lang.aspect,_2=0; |
||
| 13 | var _3=function(_4){ |
||
| 14 | this.name=_4||("DojoAopTimer #"+ ++_2); |
||
| 15 | this.inCall=0; |
||
| 16 | }; |
||
| 17 | dojo.extend(_3,{before:function(){
|
||
| 18 | if(!(this.inCall++)){ |
||
| 19 | } |
||
| 20 | },after:function(){ |
||
| 21 | if(!--this.inCall){ |
||
| 22 | } |
||
| 23 | }}); |
||
| 24 | _1.timer=function(_5){ |
||
| 25 | return new _3(_5); |
||
| 26 | }; |
||
| 27 | })(); |
||
| 28 | } |