using glutGet(GLUT_ELAPSED_TIME) instead of clock()