If a particle is projected from origin and it follows the trajectory \( y=x-\dfrac{1}{2}x^2 \), then the time of flight is: \( (g=\text{acceleration due to gravity}) \)
\( \dfrac{1}{\sqrt{g}} \)
\( \dfrac{2}{\sqrt{g}} \)
\( \dfrac{3}{\sqrt{g}} \)
\( \dfrac{4}{\sqrt{g}} \)