Skip to content

mstruebing/duration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Duration

CI Go Report Card

  1. Why
  2. Usage 2.1 Important
  3. Installation
    3.1 From Source
    3.2 With Go
    3.3 From Release Page
    3.3 via AUR

Why?

If you have processes which takes a bit longer, especially if you know round about how much time it takes to complete, it is cool to know how long the process is already running.

example

Usage

USAGE: duration [h|help|v|version|<command>]
where
        [v|version] - prints the version
        [h|help] - prints the help
        <command> - a SINGLE command or script to execute

would work:
        duration sleep 5
        duration script.sh
would NOT work:
        duration sleep 5 && sleep 4

Important

It's important to understand that currently only a single command with or without arguments can be executed. If you are chaining commands with || or && or for example, you need to put your command into a script and execute that.

Installation

From Source

In order to build from source you need go and make installed. Run: make build, this will place a binary duration in a $PWD/bin, directory.

cd ~/ && \
git clone git@github.com:mstruebing/duration.git && \
cd duration && \
make build && \
duration

Then put the binary somewhere in your $PATH

With Go

go get -u github.com/mstruebing/duration

From Release Page

You can also grab a release from the release page.

Via AUR

If you use Arch-Linux you can simply install the duration-git-package. AUR-link

i.e:

trizen -S duration-git 

License

Duration is open source software licensed under the MIT License.

See the LICENSE file for more.