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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i node-postpone

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • itivanov