I'm trying to non-dimensionalise the equation for the mass-spring system $$m\ddot{y}+ky=0$$ I've made a list of the constants and their dimensions, including the one I've added which is $g$. $$\begin{array}{ll} \text{Constant} & \text{Dimension} \\ \hline m & \small[ M \small] \\ k & \small[ M T^{-2} \small] \\ g & \small[ L T^{-2} \small]\end{array}$$
As well as the list of the variables and their dimensions
$$\begin{array}{ll} \text{Variable} & \text{Dimension} \\ \hline t & \small[ T \small] \\ y & \small[ L \small] \end{array}$$
Now, I would like to introduce the dimensionless time, $\tau$. The problem is that I do not know how to combine the constants that I have to achieve that. I always have a dimension left, such as $L$, for example. Please advise.
PS This is not a homework assignment, just in case.