Skip to content

Time Utility Program

XiaoMāo edited this page Oct 15, 2026 · 1 revision

Time-Utility-Program

Type: Capstone project Date: Sept 2026 Concepts: typedef struct, arrays of structs, time_t / struct tm, localtime() vs gmtime(), non-blocking input, 12/24-hour conversion, elapsed-time math

What it does

A menu-driven program combining a digital clock, a world clock (cities stored in an array of structs), an alarm with 12-hour AM/PM time, and a countdown timer with pause and resume, all running without blocking on input. It started as Bro Code's final project and grew well beyond the original scope.

What I learned

I debugged a pointer/value mix-up in scanf, a stale-state bug in the main menu loop, UTC-vs-local time confusion between the World Clock and Alarm, noon/midnight edge cases in 12-hour conversion, and several bugs where the logic was right but the UI refresh order hid the result. I needed outside help designing the Timer's pause/resume elapsed-time logic, then went back and traced it until I could explain why remaining only updates when pausing while startTime resets on each resume.

Source

[View the code on GitHub](https://github.com/Xiao-XC/C-Practice-Projects/tree/main/Time-Utility-Program)

Back to Home

Clone this wiki locally