Description
glfwGetTimerValue
documentation states the following:
This function returns the current value of the raw timer, measured in 1 / frequency seconds. To get the frequency, call
glfwGetTimerFrequency
.
This implies the units are seconds / frequency. However, if this were true, glfwGetTime
would be computed as glfwGetTimerValue() * glfwGetTimerFrequency()
to properly convert - this is not the case, as it's computed via glfwGetTimerValue() / glfwGetTimerFrequency()
instead. This makes sense, as our frequency units of choice (Hertz) are 1 / seconds, so we divide the number of events (no unit) by the frequency (1 / seconds) to arrive at seconds.
To avoid confusion or need to lookup source (as I experienced), the documentation should probably just read:
This function returns the current value of the raw timer. To get the current time in seconds, use
glfwGetTimerValue() / glfwGetTimerFrequency()
.
and either avoid the mention of units entirely, or figure out the correct way of describing them. (I think they technically don't even have units, since it's just an incrementing count... right? So maybe events, or platform units?)
We might also want to repeat the method to compute current time in the documentation for glfwGetTime
. (Or just move it there altogether.)