Show response headers

This commit is contained in:
Gregory Schier
2023-04-01 23:43:22 -07:00
parent 3f713d878c
commit ceefbd1de1
19 changed files with 270 additions and 129 deletions

View File

@@ -0,0 +1,9 @@
import { sleep } from './sleep';
export async function minPromiseMillis<T>(promise: Promise<T>, millis: number) {
const start = Date.now();
const result = await promise;
const delayFor = millis - (Date.now() - start);
await sleep(delayFor);
return result;
}