I have a function to print \\r (carriage return escape character) to overwrite the previously printed chars as shown below.
// show the current time in military f