One option is to have the game simply check the last time a shot was fired, and if it hasn't been long enough then ignore the player's input. I'm glad you're getting into programming, it's a great hobby!