I have a timer function that calls on a function to draw an object at a certain time. I get the time using this function:
time_elapsed = (clock()-startTime)/CLOCKS_PER_SEC;
My timer function calls itself again every 40ms seconds.
Problem is that the time_elapsed reported is smaller than real time. so even when 1 second has passed… time_elapsed thinks its 0.4 seconds