Using the fast Fourier transform to determine the period of a physical oscillator with precision