Control PWM motor running time with millis

I get no value, reason being if i have the probes with constant VCC on, the value decreases beacuse the voltage makes an electrolysis.

If you've got a better idea, it's muc appreciated.