Apparatus for measuring unknown time intervals by electromechanical means