Use non-throttled timeouts for websockets

This commit is contained in:
Fedor Indutny 2021-10-07 11:18:22 -07:00 committed by GitHub
parent 8cf6748dce
commit 27573e6dce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 107 additions and 32 deletions

18
ts/Timers.ts Normal file
View file

@ -0,0 +1,18 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
const { timers } = window.SignalContext;
export type { Timeout } from './context/Timers';
export function setTimeout(
...args: Parameters<typeof timers.setTimeout>
): ReturnType<typeof timers.setTimeout> {
return timers.setTimeout(...args);
}
export function clearTimeout(
...args: Parameters<typeof timers.clearTimeout>
): ReturnType<typeof timers.clearTimeout> {
return timers.clearTimeout(...args);
}