Time and speed measurement