Rename ofGetLastFrameTime
I had for some time wondered why there was no ofGetDeltaTime() that returns the delta time from last from to current frame, until I now realized that ofGetLastFrameTime() does exactly this (after looking in its source).
In my view it has a very bad name, i expected to get the absolute time of the last frame (I was about to calculate the delta time my self using ofGetElapsedTimef() - ofGetLastFrameTime() when i realized my mistake).
Am I the only misunderstanding its name?
+1, this also seems unintuitive to me -- some alternative names that might be worth considering (since ofGetDeltaTime() doesn't really specify what the delta is):
ofGetFrameDeltaTime() ofGetTimeSinceLastFrame() ofGetElapsedFrameTime()
or something similar ?
Yeah one of those is better.
Also i just looked a bit at the reason for the current naming. It seems to me that the name means "The time last frame took", but thats not correct, its the time between the last newFrame and the call before it (the time i'm interested in also). If the framerate is locked to something slower then the framerate the system can run, this wont be the time the last frame took.
@HalfdanJ came across this issue while trying to figure out what this function does myself.
@ofZach I am wondering if there is interest and has been any attempt at writing the documentation to make it easier to understand for beginners. If documentation PRs are being reviewed, would love to write some documentation myself.