Use non-throttled timeouts for websockets
This commit is contained in:
parent
8cf6748dce
commit
27573e6dce
7 changed files with 107 additions and 32 deletions
18
ts/Timers.ts
Normal file
18
ts/Timers.ts
Normal 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue