If you want to display something on the same line of the screen as a previous instance, such as time, then just use '\r' to move the cursor back to the beginning of the first line. It does something similary to when you press the Backspace key on the keyboard.
#include <windows.h> // assumes MS-Windows operating system
int counter = 0;
for(i = 0; i < 1000; i++)
Sleep(1000); // 1 second pause
The above just displays the value of a counter, so you will have to modify the program to display the time (hours:minutes:seconds).