Skip to content

zcorky/delay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

delay Build Status

A simple promise delay

Install

$ npm install @zcorky/delay

Usage

const delay = require('@zcorky/delay').delay;
// import { delay } from '@zcorky/delay'; // ts or es6

function bar() {
  console.log('time: ', Date.now());
}

(async () => {
	bar();

	await delay(100);

	// Executed 100 milliseconds later
	baz();
})();

Related

  • delay - Delay a promise a specified amount of time

License

MIT © Moeover

About

A simple promise delay

Resources

License

Stars

Watchers

Forks

Packages

No packages published