Skip to content

eugeneware/co-sleep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

co-sleep

setTimeout that works with the co generator framework

build status

Installation

This module is installed via npm:

$ npm install co-sleep

Example Usage

var sleep = require('co-sleep');
var co = require('co');

co(function *() {
  var now = Date.now();
  // wait for 1000 ms
  yield sleep(1000);
  expect(Date.now() - now).to.not.be.below(1000);
})();

About

setTimeout that works with the co generator framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published