I have just upgraded my OS to Windows XP and now I can see how bad my game is

After struggling for ages to get some smooth animation in the paddle of my breakout game, it seems my really low frame rate disguised a major problem. The paddle jumps when it is moved initially before moving smoothly which looks terrible. Any ideas how I can fix this?
The animation currently works like this:
1. user pushes left or right and causes a call to movePaddle, see below.
void Paddle::movePaddle( GLfloat movement, DIRECTION dir )
{
move = movement;
direction = dir;
}
2. movePaddle updates class data members which are used to update the position of the paddle in the timer callback function (GLUT), like so:
if( !left || !right )
{
paddle.currentLoc->triple[ 0 ] = paddle.currentLoc->triple[ 0 ] + (paddle.move * paddle.direction);
paddle.move -= 0.2f;
}
This appears to cause a very rigid movement which looks terrible, but is not so bad at lower frame rates.
Any advice would be greatly appreciated, and feel free to ask more question because I''m sure the code above isnt the clearest in the world