A simple yet powerful Python program that calculates the time left for a task to be completed based on either current speed or average speed.
Users manually enter:
- Max/target progress
- Current/finished progress (updated over time)
The program then:
- Calculates time left dynamically
- Displays progress bar with percentage
- Shows speed in seconds/minutes/hours depending on pace
- Handles both current and average speed calculation methods
- Two Calculation Methods:
- Average Speed Method – Calculates based on total average speed since start.
- Current Speed Method – Calculates based on the most recent progress speed.
- Real-time Progress Updates
- Automatic Time Formatting (seconds, minutes, hours)
- Colored Console Output (requires
coloredmodule) - A no-color version (not requiring
colored) is also available:Time_and_Progress_no-color.py - Handles No-Progress Cases
- Completion Detection – Displays time taken when task finishes.
-
Clone this repository
git clone https://github.com/ayankhanakaak/Time-and-Progress.git cd Time-and-Progress-main -
Install dependency (for colors)
pip install colored
-
Run the program
python "Time_and_Progress.py"or, if don't want colors or
coloredmodule:python "Time_and_Progress_no-color.py"
When you run the program, it will:
- Ask you to choose a calculation method:
1. Average Speed Method 2. Current Speed Method - Ask for max range (target value)
- Ask for initial progress
- Continuously ask for updated progress until max is reached
- Show:
- Progress bar
- Percentage complete
- Time left (or time taken if complete)
- Speed in appropriate unit
User Input
Choose method:
1. Average Speed Method
2. Current Speed Method
---> 2
Enter max range: 100
Enter progress: 10
Enter new progress: 30
Enter new progress: 55
Enter new progress: 100
Output
20%
[████████████ ]
Time Left: 3 Minutes 45 Seconds
Speed: 6.5/sec
55%
[███████████████████████ ]
Time Left: 1 Minute 15 Seconds
Speed: 4.8/sec
[████████████████████████████████]
Finished!
Time Taken: 5 Minutes 3 Seconds
This project is licensed under the GNU General Public License v3.0 – see the LICENSE file for details.
Feel free to fork this repository and submit pull requests to improve features, fix bugs, or enhance performance.
Author: Ayan Khan
GitHub: ayankhanakaak
Email: [email protected]