Also, the function cronometro() is very long and does too many things. You can separate the code that updates the counter from the code that handles the displaying: that will make it easier to follow and debug.
Also, the function cronometro() is very long and does too many things. You can separate the code that updates the counter from the code that handles the displaying: that will make it easier to follow and debug.