Estimation and control of the operate time of relays