constructor(action, cooldownMs, slowActionCooldownPumpUpFactor=0, waitWithRequestAnimationFrame=false) {
        /** @type {!function() : void} */
        this.action = action;
        /** @type {!number} */
        this.cooldownDuration = cooldownMs;
        /** @type {!number} */
        this.slowActionCooldownPumpupFactor = slowActionCooldownPumpUpFactor;
        /** @type {!boolean} */
        this._waitWithRequestAnimationFrame = waitWithRequestAnimationFrame;

        /**
         * @type {!string}
         * @private
         */
        this._state = 'idle';
        /**
         * @type {!number}
         * @private
         */
        this._cooldownStartTime = -Infinity;
    }
@param {!function() : void} action
@param {!number} cooldownMs
@param {!number} slowActionCooldownPumpUpFactor
@param {!boolean=false} waitWithRequestAnimationFrame
@constructor