When the spring undergoes displacement in the downward direction it completes one half oscillation while it completes another half oscillation in the upward direction. The total time period is:
\(T =\pi \sqrt{\frac{ m }{ k }}+\pi \sqrt{\frac{ m }{2 k }}\)