https://github.com/info-mono/ms2duration
⏲️ Milliseconds to duration converter
https://github.com/info-mono/ms2duration
basher bpkg cli converter duration info-mono posix terminal time
Last synced: 7 months ago
JSON representation
⏲️ Milliseconds to duration converter
- Host: GitHub
- URL: https://github.com/info-mono/ms2duration
- Owner: info-mono
- License: gpl-3.0
- Created: 2021-05-20T13:54:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-08T09:05:48.000Z (over 3 years ago)
- Last Synced: 2025-01-06T05:25:32.253Z (9 months ago)
- Topics: basher, bpkg, cli, converter, duration, info-mono, posix, terminal, time
- Language: Shell
- Homepage:
- Size: 28.3 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ms2duration
Milliseconds to duration converter
## 💡 About
`ms2duration` is a tool to convert milliseconds to a full durations represent a length of time written in [`portable sh`](https://github.com/dylanaraps/pure-sh-bible) inspired by [Nushell's duration data type](https://www.nushell.sh/book/types_of_data.html#duration) and [Starship's Command duration module](https://starship.rs/config/#command-duration).## 🚀 Setup
### 🧾 Dependencies
- [Unix commands](https://en.wikipedia.org/wiki/List_of_Unix_commands) to process### 📥 Installation
#### 🔧 Manually
Option 1: using `curl`
```sh
curl https://raw.githubusercontent.com/info-mono/ms2duration/main/bin/ms2duration > ~/.local/bin/ms2duration
chmod +x ~/.local/bin/ms2duration
```Option 2: using `git`
```sh
git clone https://github.com/info-mono/ms2duration.git ~/.local/share/ms2duration
ln -s ~/.local/share/ms2duration/bin/ms2duration ~/.local/bin/ms2duration
```#### 📦 Package manager
For [Bpkg](https://github.com/bpkg/bpkg) user:
```sh
bpkg install info-mono/ms2duration
```For [Basher](https://github.com/basherpm/basher) user:
```sh
basher install info-mono/ms2duration
```> *If you can and want to port ms2duration to other package managers, feel free to do so.*
## ⌨️ Usage
Run 'ms2duration' in the terminal:
```sh
ms2duration MILLISECONDS
```## 💌 Credits
Special thanks to:
- [**Nushell**](https://www.nushell.sh) by [it's contributors](https://github.com/nushell/nushell/graphs/contributors)
- [**Starship**](https://starship.rs) by [it's contributors](https://github.com/starship/starship/graphs/contributors)
---
>
Made with ❤️ by
@info-mono
>
>