toys

Tools and things that make my life easier - y'all might like them too

View the Project on GitHub pfuntner/toys

timer

Purpose

Runs a timer for a specified duration. A progress meter is shown with details of:

The output is presented at intervals on a single line.

Syntax

Syntax: timer [-v|--verbose] INT # seconds
        timer [-v|--verbose] INTs # seconds
        timer [-v|--verbose] INTm # minutes
        timer [-v|--verbose] INTh # hours

Options and arguments

| Option | Description | Default | | —— | ———– | ——- | | -v | Enable verbose debugging | Debugging is not enabled |

Example

Since the output appears on a single line this isn’t exactly what you’ll see but this is an idea of what the output looks like.

$ timer 10 # ten seconds
2019-02-16 08:48:12.325835 ☐☐☐☐☐☐☐☐☐☐   0.00% 0.00 10.00
2019-02-16 08:48:14.580168 ☒☒☐☐☐☐☐☐☐☐  22.54% 2.25 7.75
2019-02-16 08:48:16.834748 ☒☒☒☒☒☐☐☐☐☐  45.09% 4.51 5.49
2019-02-16 08:48:21.092859 ☒☒☒☒☒☒☒☒☒☐  87.67% 8.77 1.23
$

Notes