Use ticks for time rather than directly seconds, so that if the fps slows down (slowing down character movement, enemy movement), enemy spawning and character bullet spawning will slow down as well.