Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nodef/sleep.cmd
Sleep for specified time in Windows Command prompt.
https://github.com/nodef/sleep.cmd
application cli cmd command console interface line prompt sleep windows
Last synced: about 1 month ago
JSON representation
Sleep for specified time in Windows Command prompt.
- Host: GitHub
- URL: https://github.com/nodef/sleep.cmd
- Owner: nodef
- License: mit
- Created: 2018-08-02T14:00:13.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-11T15:39:42.000Z (over 1 year ago)
- Last Synced: 2024-09-29T22:46:25.600Z (about 2 months ago)
- Topics: application, cli, cmd, command, console, interface, line, prompt, sleep, windows
- Language: C#
- Homepage: https://www.npmjs.com/package/sleep.cmd
- Size: 65.4 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
Sleep for specified time in Windows Command prompt.
🖥️ [Command prompt](https://www.npmjs.com/package/sleep.cmd),
📜 [Files](https://unpkg.com/sleep.cmd/).[sleep] is a command in *Unix-like* operating systems that **suspends program**
**execution** for specified time. This package provides the `sleep` command for
Windows [Command prompt], with exactly the **same behaviour** as in *Unix-like*
*systems*. Please check examples below. [Source code] for the executable is
written in `C#`. It should be noted *small delays* (few milliseconds) are *less*
*accurate*.> Stability: [Stable](https://www.youtube.com/watch?v=L1j93RnIxEo).
[sleep]: https://en.wikipedia.org/wiki/Sleep_(Unix)
[Command prompt]: https://en.wikipedia.org/wiki/Cmd.exe
[Source code]: https://replit.com/@wolfram77/sleep-cmd
```bash
# Install on Windows
$ npm install -g sleep.cmd
```
```bash
$ sleep [unit] | [option]
# Units:
# s: sleep for number seconds.
# m: sleep for number minutes.
# h: sleep for number hours.
# d: sleep for number days.
# Options:
# --help: get help
# --version: get version details
```
```bash
# sleep for 0.1 seconds
$ sleep 0.1# sleep for 1.23 minutes
$ sleep 1.23m# sleep for 1 day 23 hours
$ sleep 1d && sleep 23h
```
## References
- [sleep (Unix)][sleep]
- [Thread.Sleep Method (C#)](https://docs.microsoft.com/en-us/dotnet/api/system.threading.thread.sleep)
[![](https://img.youtube.com/vi/rCSCPujLs14/maxresdefault.jpg)](https://www.youtube.com/watch?v=rCSCPujLs14)
[![ORG](https://img.shields.io/badge/org-nodef-green?logo=Org)](https://nodef.github.io)
[![DOI](https://zenodo.org/badge/143302321.svg)](https://zenodo.org/badge/latestdoi/143302321)