Made during CSO-101 lab evaluation
Duration-Finder is a C-based command-line utility designed to compute the duration between two time points. Given two time values (in a specified format), the program calculates and displays the elapsed time between them in hours, minutes, and seconds.
- Accepts user input for two time points.
- Computes and displays the duration in HH:MM:SS format.
- Simple command-line interface.
- Educational Purposes: Demonstrate time calculations and C programming concepts.
- Lab Assignments: Useful for Computer Science students as a lab evaluation project.
- Scripting: Can be used in scripts where duration calculation is needed.
- GCC or any standard C compiler.
make(optional, for using the included Makefile).
-
Clone the Repository
git clone https://github.com/Jayesh-Dev21/Duration-Finder.git cd Duration-Finder -
Build the Program
- If you have make installed:
make
- Or compile manually:
gcc -o duration_finder main.c
- If you have make installed:
Run the compiled executable:
./duration_finderYou will be prompted to enter the start and end times. The program will output the duration between the two.
Note: Ensure you follow the time input format as prompted by the program.
Enter start time (HH MM SS): 10 30 00
Enter end time (HH MM SS): 12 45 30
Duration: 2 hours, 15 minutes, 30 seconds
.
├── main.c # Main source code
├── Makefile # Build instructions
└── README.md # Project documentation
Feel free to fork the repository and submit pull requests for improvements or bug fixes.
This project is for educational use.