https://github.com/jftuga/timeit
A cross-platform CLI tool used to time the duration of the given command
https://github.com/jftuga/timeit
command-line-tool cross-platform golang timer
Last synced: 11 months ago
JSON representation
A cross-platform CLI tool used to time the duration of the given command
- Host: GitHub
- URL: https://github.com/jftuga/timeit
- Owner: jftuga
- License: mit
- Created: 2020-05-16T10:17:13.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-07-27T16:21:48.000Z (almost 2 years ago)
- Last Synced: 2024-07-28T17:23:57.837Z (almost 2 years ago)
- Topics: command-line-tool, cross-platform, golang, timer
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# timeit
A cross-platform CLI tool used to time the duration of the given command
## Installation
* [Binaries](https://github.com/jftuga/timeit/releases) are available for Windows, MacOS and Linux
* Homebrew installation for MacOS and Linux:
* * `brew tap jftuga/homebrew-tap; brew update; brew install jftuga/tap/timeit`
## Usage
```
Usage: timeit [cmd] [args...]
You may need to surround args within double-quotes
Examples:
timeit wget https://example.com/file.tar.gz
timeit gzip -t "file with spaces.gz"
For built-in Windows 'cmd' commands:
timeit cmd /c "dir c:\ /s/b > list.txt"
timeit cmd /c dir /s "c:\Program Files"
Run 'timeit _start' to create (or overwrite) this file containing the current time: .timeit.start.tmp
Run 'timeit _end' to read (and then delete) that file. The elapsed time will then be displayed.
This can be useful for timing multiple, long-running commands.
```
## Examples
```
c:\>timeit.exe sleep 2
2.04042s
```
```
pi@pi:~ $ timeit md5sum linux.iso
4.1329682s
```
```
c:\>timeit _start
c:\>long_running_process 1
c:\>long_running_process 2
c:\>long_running_process 3
c:\timeit _end
6h0m57.2788758s
```