It ends up that my problem is that if you click on a console window in windows 10, the program ceases execution when it enters "quick edit" mode.
I was not aware of that new behavior and thought the timer was not working. The program run fine, as is, if you don't touch the mouse.