node-postpone

0.1.2 • Public • Published

Node.js Postpone

Postpone function execution

Installation

npm install node-postpone --save

Usage

var postpone = require('node-postpone');
 
var now = postpone.now();
 
postpone.wait(1000, function() {
  console.log('done after 1 sec');
});
 
postpone.runasync(1000,
    function() {
        console.log('done task 1 : immediately');
    },
    function() {
        console.log('done task 2 : after 1 sec');
    }
);
 
postpone.runsync(1000,
    function() {
        console.log('done task 1 : immediately');
    },
    function() {
        console.log('done task 2 : 1 sec after task 1');
    }
);

Unit tests

npm test

License

MIT

Package Sidebar

Install

npm i node-postpone

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • itivanov