text: /**
   * Hilo 1.0.0 for amd
   * Copyright 2015 alibaba.com
   * Licensed under the MIT License
   */
  define("hilo/util/Ticker",["hilo/core/Class","hilo/core/Hilo"],function(t,i){var e=t.create({constructor:function(t){this._targetFPS=t||30,this._interval=1e3/this._targetFPS,this._tickers=[]},_paused:!1,_targetFPS:0,_interval:0,_intervalId:null,_tickers:null,_lastTime:0,_tickCount:0,_tickTime:0,_measuredFPS:0,start:function(t){if(!this._intervalId){this._lastTime=+new Date;var e=this,s=this._interval,n=window.requestAnimationFrame||window[i.browser.jsVendor+"RequestAnimationFrame"];if(t&&n)var r=function(){e._tick()},c=function(){e._intervalId=setTimeout(c,s),n(r)};else c=function(){e._intervalId=setTimeout(c,s),e._tick()};c()}},stop:function(){clearTimeout(this._intervalId),this._intervalId=null,this._lastTime=0},pause:function(){this._paused=!0},resume:function(){this._paused=!1},_tick:function(){if(!this._paused){var t=+new Date,i=t-this._lastTime,e=this._tickers;++this._tickCount>=this._targetFPS?(this._measuredFPS=1e3/(this._tickTime/this._tickCount)+.5>>0,this._tickCount=0,this._tickTime=0):this._tickTime+=t-this._lastTime,this._lastTime=t;for(var s=0,n=e.length;n>s;s++)e[s].tick(i)}},getMeasuredFPS:function(){return this._measuredFPS},addTick:function(t){if(!t||"function"!=typeof t.tick)throw new Error("Ticker: The tick object must implement the tick method.");this._tickers.push(t)},removeTick:function(t){var i=this._tickers,e=i.indexOf(t);e>=0&&i.splice(e,1)}});return e});