Given,
$\frac{d^{2} y}{d t^{2}}+2 y=0\,...(i)$
But, we know that
$\frac{d^{2} y}{d t^{2}}+\omega^{2} Y=0\,...(ii)$
Comparing both equation, we get
$\omega^{2} =2 $
$\Rightarrow \omega =\sqrt{2} $
The periodic time
$T=\frac{2 \pi}{\omega}=\frac{2 \pi}{\sqrt{2}}$
$=\sqrt{2} \pi=\pi \sqrt{2} \,s$