All Projects → jochemstoel → nodejs-system-sleep

jochemstoel / nodejs-system-sleep

Licence: Unlicense License
Sleep function for Node.js All platforms.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nodejs-system-sleep

Daemonize
daemonize is a library for writing system daemons in Python.
Stars: ✭ 396 (+742.55%)
Mutual labels:  system, osx
Iglance
Free system monitor for OSX and macOS. See all system information at a glance in the menu bar.
Stars: ✭ 1,358 (+2789.36%)
Mutual labels:  system, osx
Daemonize
Library for writing system daemons
Stars: ✭ 210 (+346.81%)
Mutual labels:  system, osx
CoTerminalApps
Retro ASCII Puzzles plus SpaceInvaders, Pacman & Frogger arcade games that run WITH SOUND in a terminal on any platform !!
Stars: ✭ 21 (-55.32%)
Mutual labels:  osx
Themeable
Easy, type-safe UI theming in Swift
Stars: ✭ 38 (-19.15%)
Mutual labels:  osx
osx-ch341-serial
CH340/CH341 based USB to Serial Port Adapter driver for Mac OSX
Stars: ✭ 17 (-63.83%)
Mutual labels:  osx
meetup
Cat System Workshop is a regular meet-up focusing on “system software”. We would like to gather all developers to share their experience regarding system software and learn from each other, making system software more perfect and complete!
Stars: ✭ 52 (+10.64%)
Mutual labels:  system
EnhanceDiskUtility
SIMBL plugin for Disk Utility that aims to enable Verify / Repair Permissions support
Stars: ✭ 17 (-63.83%)
Mutual labels:  osx
Popover
Custom macOS Popover 💬
Stars: ✭ 71 (+51.06%)
Mutual labels:  osx
rocksmithconvert
Simple standalone OSX app to convert Rocksmith 2014 .psarc (CDLC) files between PC and MAC.
Stars: ✭ 45 (-4.26%)
Mutual labels:  osx
installme-osx
My personal script to setup a new OSX
Stars: ✭ 57 (+21.28%)
Mutual labels:  osx
SuperLauncher
🚀 Super Launcher is an admin launcher that persists in the system tray that can launch programs quickly; optionally, with administrator rights, as another user, or both.
Stars: ✭ 36 (-23.4%)
Mutual labels:  system
nap
A tiny, statically linked program that calls the "sleep" system call
Stars: ✭ 21 (-55.32%)
Mutual labels:  sleep
ALT
Non-contact real-time heartbeats and respiration monitoring using Artificial Light Texture (ALT).
Stars: ✭ 41 (-12.77%)
Mutual labels:  sleep
AnyOption
C/C++ Command line and resource file option parsing
Stars: ✭ 83 (+76.6%)
Mutual labels:  osx
chai
Don't let your Mac fall asleep, like a sir
Stars: ✭ 54 (+14.89%)
Mutual labels:  sleep
Phew
FLIF image viewer and QuickLook plugin for macOS
Stars: ✭ 74 (+57.45%)
Mutual labels:  osx
yout
🔥 YouTube playlist player for desktop. Free, no YouTube ads, floating window. Available for Linux, Mac and Windows.
Stars: ✭ 82 (+74.47%)
Mutual labels:  osx
tmo-live-graph
A simpe react app that plots a live view of the T-Mobile Home Internet Nokia 5G Gateway signal stats, helpful for optimizing signal.
Stars: ✭ 15 (-68.09%)
Mutual labels:  osx
MacOS-Dotfiles
No description or website provided.
Stars: ✭ 85 (+80.85%)
Mutual labels:  osx

Node.js Sleep()

for those who need Sleep() just like me.

Sleeping Beauty

31 january 2017 | UPDATE: NO LONGER REQUIRES CHILD PROCESS, using deasync instead.

 @package system-sleep
 @version 1.2
 @author Jochem Stoel (http://jochemstoel.github.io)
 @license don't involve me
  • will make the system wait xxx milliseconds.

  • can be used to delay script execution.

  • is often used to relax the system in between resource intensive tasks.

  • works on every platform x86 + x64 Windows / Linux / OSX

  • Existing sleep() solutions use a blocking while loop which uses 100% CPU. This is incredibly stupid.

  • Also, many sleep() solutions are only for Windows or only for Linux.

Install using NPM

npm install system-sleep

Use

var sleep = require('system-sleep');
sleep(5000); // 5 seconds

Test

Prints variable y to the console every 1 second during 10 seconds.

var sleep = require('system-sleep');
for (y = 0; y < 10; y++) {
	console.log(y);
	sleep(1000);
}

Jochem Stoel

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].