Skip to content

Instantly share code, notes, and snippets.

@sunpietro
Created December 14, 2023 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sunpietro/e889d254b2ae76cc04eaa2ee85acbcc1 to your computer and use it in GitHub Desktop.
Save sunpietro/e889d254b2ae76cc04eaa2ee85acbcc1 to your computer and use it in GitHub Desktop.
Simple function to simulate long requests
const delay = async () => {
const delayPromise = new Promise((resolve) => {
setTimeout(resolve, 20000);
});
return delayPromise;
};
// await delay();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment