MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / sleep

Function sleep

javascript_games/ducklings.js:17–19  ·  view source on GitHub ↗
(seconds)

Source from the content-addressed store, hash-verified

15'use strict';
16
17function sleep(seconds) {
18 return new Promise(resolve => setTimeout(resolve, seconds * 1000));
19}
20
21// Set up the constants:
22const PAUSE = 0.2; // (!) Try changing this to 1.0 or 0.0.

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected