added jsdoc comments to fakeDelay tool

This commit is contained in:
darkicewolf50 2024-03-12 12:24:54 -06:00
parent 3d0872bd96
commit 09fd161ba2

View File

@ -1,18 +1,12 @@
/**
function fakeDelay(ms) { * @param {int} ms - time in ms to add a delay
/* * @returns {Promise(resolve)} Promise - reutrns an empty promise after the set time
useful for testing allows for a fake response, allow us to see what the program does while waiting for data from the backend * @description Testing tool to delay a function deliberatly
REQUIRES: * @author Brock <darkicewolf50@gmail.com>
time in milliseconds * @example await fakeDelay(5000);
needs a line like this to run
await fakeDelay(5000);
PROMISES:
nothing
Develop in part by: Brock
Contact: darkicewolf50@gmial.com
*/ */
return new Promise(resolve => setTimeout(resolve, ms)); function fakeDelay(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
} }
export default fakeDelay; export default fakeDelay;