(obj, opts)
| 697 | var NATIVE_SET_TIMEOUT = globalThisShim.setTimeout; |
| 698 | var NATIVE_CLEAR_TIMEOUT = globalThisShim.clearTimeout; |
| 699 | function installTimerFunctions(obj, opts) { |
| 700 | if (opts.useNativeTimers) { |
| 701 | obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThisShim); |
| 702 | obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThisShim); |
| 703 | } else { |
| 704 | obj.setTimeoutFn = globalThisShim.setTimeout.bind(globalThisShim); |
| 705 | obj.clearTimeoutFn = globalThisShim.clearTimeout.bind(globalThisShim); |
| 706 | } |
| 707 | } |
| 708 | // base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64) |
| 709 | var BASE64_OVERHEAD = 1.33; |
| 710 | // we could also have used `new Blob([obj]).size`, but it isn't supported in IE9 |
no test coverage detected