C++ - using glfwGetTime() for a fixed time step
问题 After doing some research and debugging in my C++ project with glfwGetTime(), I'm having trouble making a game loop for my project. As far as time goes I really only worked with nanoseconds in Java and on the GLFW website it states that the function returns the time in seconds . How would I make a fixed time step loop with glfwGetTime()? What I have now - while(!glfwWindowShouldClose(window)) { double now = glfwGetTime(); double delta = now - lastTime; lastTime = now; accumulator += delta;