| 1 | # go-sleep sleeps for some duration |
| 2 | |
| 3 | This unix tool is a thin wrapper around `time.Sleep()`. |
| 4 | It aims to provide a portable way to sleep for an amount of time that |
| 5 | need not to be a number of seconds. |
| 6 | |
| 7 | See https://godoc.org/time#ParseDuration for how the duration can be |
| 8 | specified. |
| 9 | |
| 10 | ### Install |
| 11 | |
| 12 | ```sh |
| 13 | go install github.com/chriscool/go-sleep |
| 14 | ``` |
| 15 | |
| 16 | ### Usage: |
| 17 | |
| 18 | ``` |
| 19 | > go-sleep |
| 20 | Usage: go-sleep <duration> |
| 21 | Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". |
| 22 | See https://godoc.org/time#ParseDuration for more. |
| 23 | > time go-sleep 100ms |
| 24 | |
| 25 | real 0m0.104s |
| 26 | user 0m0.000s |
| 27 | sys 0m0.007s |
| 28 | ``` |
| 29 | |
| 30 | ### License |
| 31 | |
| 32 | MIT |