frame-based timers

it's often difficult to work with real-time timers, because sometimes the game lags and so things work slower, but the timers stay exactly the same, causing things to happen at the wrong time. having a frame-based timer would fix this up easily 
