MCPcopy Create free account
hub / github.com/angular/dev-infra / setTimeout

Method setTimeout

github-actions/browserstack/set-browserstack-env.js:6057–6078  ·  view source on GitHub ↗
(delay, type)

Source from the content-addressed store, hash-verified

6055 this.maxResponseSize = client[kMaxResponseSize];
6056 }
6057 setTimeout(delay, type) {
6058 if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) {
6059 if (this.timeout) {
6060 timers.clearTimeout(this.timeout);
6061 this.timeout = null;
6062 }
6063 if (delay) {
6064 if (type & USE_FAST_TIMER) {
6065 this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this));
6066 } else {
6067 this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this));
6068 this.timeout.unref();
6069 }
6070 }
6071 this.timeoutValue = delay;
6072 } else if (this.timeout) {
6073 if (this.timeout.refresh) {
6074 this.timeout.refresh();
6075 }
6076 }
6077 this.timeoutType = type;
6078 }
6079 resume() {
6080 if (this.socket.destroyed || !this.paused) {
6081 return;

Callers 2

onHeadersCompleteMethod · 0.45
resumeH1Function · 0.45

Calls 2

setTimeoutFunction · 0.70
refreshMethod · 0.45

Tested by

no test coverage detected