In an ensemble setting, keeping time is the single most important job of a drummer. Guess who is second in line? As a bass player, I’ve used several practices to keep good time. One is a metronome, another is a drum machine, and the third is my body (check out my course on Music Dojo… I know shameless plug). In this day and time there are many computer applications that can be used such as plug-ins to achieve both the same purpose of a metronome and drum machine. Battery, Stylus and Garage band are just a few to name.
Any instrumentalist can use a metronome to work on their timing. I suggest using it in more ways than one. Pick various tempos to practice playing a line as you would as if performing. Make sure the click is loud enough so that you can hear it land in the same place consistently. This is the most basic, but effective way to work on your timing.
I’ve used the drum machine and plug-ins for most of my practicing. They were always more fun to work with and can be use the same way. Program different beats at various tempos and play a line as if you were performing but making sure you stay consistence with the beat. There are many ways that you can make it more interesting. One is by playing the form of a song over the same beat. This is a two-fold practice for grooves as well.
As for my body, I use it every time I pick up my instrument. I, personally, have incorporated my foot and my head as my time keeping partners. They help me get deeper into the groove as well and keep me in line for the drummer that tries to throw me off during his solo. Find out whatever works for you. I know it sounds strange, but your body will, usually, let you know how you can best feel the time and groove. When it does it becomes second nature. Now, I look at countless videos of my goofy head bobbing! Have fun with it!