class Timeout { #id; #refCount = 1; #clearFunction; constructor(id, clearFunction) { this.#id = id; this.#refCount = 1; this.#clearFunction = clearFunction; } ref() { this.#refCount += 1; } hasRef() { return this.#refCount > 0; } unref() { this.#refCount -= 1; var clearFunction = this.#clearFunction; if (clearFunction && this.#refCount === 0) { this.#clearFunction = null; clearFunction(this.#id); } } } export const setInterval = globalThis.setInterval; export const setImmediate = globalThis.queueMicrotask; export const setTimeout = globalThis.setTimeout; export const clearInterval = globalThis.clearInterval; // not implemented export const clearImmediate = () => {}; export const clearTimeout = globalThis.clearTimeout; export const queueMicrotask = globalThis.queueMicrotask; export default { setInterval, queueMicrotask, setImmediate, setTimeout, clearInterval, clearImmediate, clearTimeout, }; ion value='bun-crash-dump'>bun-crash-dump Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/integration/bunjs-only-snippets/sleep.js (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2022-04-01Update response.zigGravatar Jarred Sumner 1-1/+1
2022-04-01[bun.js] Fix use-after-free in Bun.writeGravatar Jarred Sumner 1-3/+3
2022-04-01Test written lengthGravatar Jarred Sumner 1-1/+1
2022-04-01http file exampleGravatar Jarred Sumner 2-0/+25
2022-04-01Fix sendfile() after changes to blobGravatar Jarred Sumner 1-500/+567
2022-04-01Fix mimetype valueGravatar Jarred Sumner 1-4/+37
2022-04-01Make `FetchHeaders` workjarred/fetchheadersGravatar Jarred Sumner 9-104/+95
2022-04-01[bun.js] Expose `ErrorEvent`Gravatar Jarred Sumner 2-37/+52
2022-04-01[bun.js] Use `Headers` from WebKit instead of customGravatar Jarred Sumner 44-843/+5918
2022-03-31Update WebKitGravatar Jarred Sumner 1-0/+0
2022-03-31Delete unusedGravatar Jarred Sumner 1-5/+0
2022-03-31Allow a little leeway when HMRGravatar Jarred Sumner 1-1/+2
2022-03-31Fix more infinite loopsGravatar Jarred Sumner 1-2/+2
2022-03-31Bugfixes to how we build WebCore codeGravatar Jarred Sumner 29-170/+384
2022-03-31[bun dev] Re-create the shared buffer for each websocketGravatar Jarred Sumner 1-6/+5
2022-03-31[bun dev] Improve HMR reliability when filesystem is slow or reading large filesGravatar Jarred Sumner 2-19/+68
2022-03-31Fix possible infinite loopsGravatar Jarred Sumner 1-3/+3
2022-03-30Update bindings.cppGravatar Jarred Sumner 1-0/+24
2022-03-30[bun.js] Support `file://` URLs in node fsGravatar Jarred Sumner 9-6/+102
2022-03-30Bump target next version to 12.1.3Gravatar Jarred Sumner 1-1/+1
2022-03-30Add test for Bun.hash that runs it with a Uint8ArrayGravatar Jarred Sumner 1-8/+16