arduino uno r3 timer0 timer1

You have not given any explanation of what you are trying to do.
I am not going to spend an hour trying to figure out your code.
It is not organized as Arduino code.

...R