MCPcopy Index your code
hub / github.com/ampproject/amphtml / sleep

Function sleep

build-system/tasks/visual-diff/helpers.js:28–30  ·  view source on GitHub ↗

* Returns a Promise that resolves after the specified number of milliseconds. * @param {number} ms * @return {Promise }

(ms)

Source from the content-addressed store, hash-verified

26 * @return {Promise<void>}
27 */
28async function sleep(ms) {
29 return new Promise((res) => setTimeout(res, ms));
30}
31
32module.exports = {
33 escapeHtml,

Callers 4

devModeFunction · 0.70
snapshotWebpagesFunction · 0.70
waitForElementVisibilityFunction · 0.70
waitForSelectorExistenceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected