Make the simulation speed independent of the framerate

This commit fixes issue #17