As for the code, that's not quite correct, you should be adding gravity * time to the player's Y velocity - remember it is an acceleration and acceleration is added to velocity as a vector (otherwise there wouldn't be much point in differentiating them). And the usage of time is slightly different but it really depends on what integration method you use, the most basic (and unstable) one is below. So you need to keep track of both the player's position and velocity, and each frame, go:
playerVelocity += gravity * time; playerPosition += playerVelocity * time; // multiply by time again! google "explicit integration forward Euler" for explanations.
Of course, you need to handle collision with the ground otherwise your character will speed up downwards forever. You may find this useful, too.