lib/raf.js
function () {
    /**
     * Return the current timestamp integer.
     */
    var now = Date.now || function () {
      return new Date().getTime();
    };

    // Keep track of the previous "animation frame" manually.
    var prev = now();

    return function (fn) {
      var curr = now();
      var ms   = Math.max(0, 16 - (curr - prev));
      var req  = setTimeout(fn, ms);

      prev = curr;

      return req;
    };
  }
function () {
    /**
     * Return the current timestamp integer.
     */
    var now = Date.now || function () {
      return new Date().getTime();
    };

    // Keep track of the previous "animation frame" manually.
    var prev = now();

    return function (fn) {
      var curr = now();
      var ms   = Math.max(0, 16 - (curr - prev));
      var req  = setTimeout(fn, ms);

      prev = curr;

      return req;
    };
  }
function ( ) { /**
     * Return the current timestamp integer.
     */ var now = Date . now || function ( ) { return new Date ( ) . getTime ( ) ; } ; // Keep track of the previous "animation frame" manually. var prev = now ( ) ; return function ( fn ) { var curr = now ( ) ; var ms = Math . max ( 0 , 16 - ( curr - prev ) ) ; var req = setTimeout ( fn , ms ) ; prev = curr ; return req ; } ; }
Fallback animation frame implementation.

@return {Function}
Fallback animation frame implementation .