Implemented function to obtain period from a given frequency