What result have you got by replacing the user-defined delay function by the Arduino delay function? Is the system working?
//-----------------------------------------------------------------------------------------------------
Do you know how does multi-digit cc-type 7-segment display unit work?
Do you know why do we need delay (at least 1 ms) in-between displaying the contents of the digit positions? This is needed to synchronize the digit's positional data with its cc-pin. I am unable to explain it to you in writing.
Do you have idea on the working principle of TC1 Module of Atmega328?
If the answers to the above questions are YES; you would be able to understand the program codes with a little bit efforts and experimentation using UNO/7-seg Monitor.
If the answers are NO; you have to wait until you make the answers YES!