Frequency of oscillations is the number of oscillations of a vibrating object per second. Therefore frequency is = 40 vibrations /4 seconds= 10 Hertz.
Time period is the time required to complete one oscillation. Or it is the inverse of time period.
Therefore time period = 1/10 = 0.1 seconds.