One issue: It updates every 0.9 seconds so it looks like it counts too fast and then it stops at a second for too long. As a solution you could either do as righttoolforjob said and read the time more often so that the inaccuracy is unnoticeable, or to make it as efficient as possible, you can try to sleep for exactly the right amount of time.
If you want to try to sleep for the exact right amount of time, this is a great opportunity to learn about some more system calls because that's something you often come in contact with when programming in C. Here is an example of how it can be done on Linux...
Before the loop, get the current time in nanosecond precision by using `clock_gettime(CLOCK_REALTIME, &t)`, where t is a `struct timespec` that needs to be declared before the call. Then in the loop (in the end), increment t.tv_sec by one and sleep until that new absolute time by calling `clock_nanosleep(CLOCK_REALTIME, TIMER_ABSTIME, &t, NULL)`.
Another thing you can try is to print the exact time at sub-second precision when the user presses ctrl+c. Here you can use clock_gettime again to get the exact time, and to catch the ctrl+c you need to use the `signal(SIGINT, your_ctrl_c_handler_function)` system call.