Using Decimals in an Equation

timer1 = tOn / 1000000;

since tOn is an integer, the calculation is performed using integer math where the result will be zero if tOn is anything less than 1000000.

timer1 = tOn / 1000000.0;
will perform the calculation with floating pt math because 1000000.0 is a float