* [constructor description] * @param {Number} ttl timeout
(ttl, Promise)
| 20 | * @param {Number} ttl timeout |
| 21 | */ |
| 22 | constructor(ttl, Promise) { |
| 23 | super(Promise); |
| 24 | this._creationTimestamp = Date.now(); |
| 25 | this._timeout = null; |
| 26 | |
| 27 | if (ttl !== undefined) { |
| 28 | this.setTimeout(ttl); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | setTimeout(delay) { |
| 33 | if (this._state !== ResourceRequest.PENDING) { |
nothing calls this directly
no test coverage detected