Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 7 days ago
JSON representation

Sleep for specified time in Windows Command prompt.

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)