Skip to content
/ gosleep Public

"sleep(1)", but with Go duration parsing OR explicit time to sleep until and a progress bar

License

Notifications You must be signed in to change notification settings

tianon/gosleep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

79671f3 · Jul 9, 2024

History

42 Commits
Jul 9, 2024
Sep 13, 2018
May 11, 2017
Sep 24, 2020
Sep 24, 2020
Jun 7, 2021
Jun 7, 2021
May 11, 2017
Dec 13, 2016
Sep 13, 2018
Sep 13, 2018
Sep 13, 2018
May 11, 2017

Repository files navigation

gosleep

sleep(1), but with Go duration parsing (1m, 2h3m2s) OR explicit time to sleep until (13:04, 2016-11-18 00:00:00) and a progress bar.

Example

example animated GIF

$ gosleep --help
Usage:
  gosleep --for <duration> OR --until <time>

Application Options:
      --for
      --until

Help Options:
  -h, --help   Show this help message

$ gosleep --for 10s
 10s / 10s [███████████████████████████████████████████████████████████] 100.0% 
$ date
Tue Dec 13 14:38:20 PST 2016
$ gosleep --until 14:38:20
error: requested sleep time in the past: -8.415878269s
$ gosleep --until 14:39
 19s / 19s [███████████████████████████████████████████████████████████] 100.0% 
$ gosleep --until '2016-11-17 00:00:00'
error: requested sleep time in the past: -638h39m3.910603384s
$ gosleep --until '2017-01-01 00:00:00'
^C8s / 441h20m45s [                                                    ]   0.0% 
$ gosleep --until '2016-12-13 17:00'
 22s / 2h19m6s [▏                                                      ]   0.3% 

About

"sleep(1)", but with Go duration parsing OR explicit time to sleep until and a progress bar

Resources

License

Stars

Watchers

Forks

Packages

No packages published