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

Function sleep

javascript_games/magicfortuneball.js:10–12  ·  view source on GitHub ↗
(seconds)

Source from the content-addressed store, hash-verified

8const readlineSync = require('readline-sync');
9
10function sleep(seconds) {
11 return new Promise(resolve => setTimeout(resolve, seconds * 1000));
12}
13
14async function slowSpacePrint(text, interval=0.1) {
15 for (let i = 0; i < text.length; i++) {

Callers 2

slowSpacePrintFunction · 0.70
mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected