You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Displays the current local time, refreshing every second, with a non-blocking option to power off back to the menu. It was Bro Code's original final project and later became one feature of the Time-Utility-Program.
What I learned
My first version used scanf inside the refresh loop, which blocked and froze the clock while it waited for input. _kbhit() / _getch() fixed it because they check for a keypress without pausing. I also fixed a crash caused by passing *option to scanf instead of option: since option was already a pointer, dereferencing it passed a value where scanf needed an address.