Here are a couple of tricks that have helped me in the past. Both of these are done at the piano, and involve exercises and scales.

1) Use Hanon dexterity exercises and change the rhythm.

Instead of just playing straight 4/4 16th notes, change these to various patterns. Make the first three 16th notes into an eigth note and two 16ths. Practice this until the time is perfect. This helps keep the pattern even. Vary the patterns to different rhythms besides this.

2) Try the contrary motion chromatic scale. (Sound bigger and harder than it really is).

Put the left thumb on Middle C. Put your right thumb on E above. Play two different rhythms against each other such as eights in the left with quarters in the right.

Go up and down the scale a few octaves in each direction. If you're accurate, your hands will end up together when you come back to the starting position.

Vary the patterns as you see fit. Try two against three, three against two, etc.

Actually of the two, I found the contrary motion one to be the most helpful. I think it is easier to hear the different beats because the tone is so different against each other.

Of course practice slowly with the metronome on both of these to ensure that the time is accurate.