Simple time-of-flight method to measure the beam energy of a cyclotron