I've found practicing with a metronome to be invaluable.
Also, I've found practicing with a drum machine (vs. a metronome) makes a big difference for me in the enjoyment factor, and somehow - not exactly sure how/why - I seem to play better with a drum machine vs. a "click click click" metronome.
Here is one free online drum machine I use. There are others if you look around.
DrumBit Drum Machine
Click on the button that says "No Demo" to see the different canned styles that are already in the drum machine that you can select/use. Then you can click on the squares in the matrix to turn various beats/sounds on & off.