Skip to content

wl5e/rust-countdown-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Rust Countdown Timer

A simple, functional countdown timer for the terminal written in Rust.

Description

This is a lightweight countdown timer that runs in your terminal. It displays the remaining time with color formatting and can parse various time formats including hours, minutes, and seconds.

Features

  • Parse time in formats: 30s, 5m, 2h, 1h30m, 1h30m45s
  • Color-coded output (green for running, yellow for final 10 seconds, red when done)
  • Clear terminal display
  • System beep when timer completes

Usage

Run the timer

cargo run -- 5m

Examples

# 30 seconds
cargo run -- 30s

# 5 minutes
cargo run -- 5m

# 2 hours
cargo run -- 2h

# Combined format
cargo run -- 1h30m45s
cargo run -- 2m30s

Installation

  1. Make sure you have Rust installed: https://rustup.rs/
  2. Clone this repository
  3. Run cargo build --release
  4. The binary will be in target/release/countdown-timer

How to Run

cargo run -- <time>

Where <time> is a duration string like 5m, 30s, 1h30m, etc.

About

A simple terminal-based countdown timer with color output and system notifications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages