glfwGetTime function
! @brief Returns the GLFW time.
This function returns the current GLFW time, in seconds. Unless the time has been set using @ref glfwSetTime it measures time elapsed since GLFW was initialized.
This function and @ref glfwSetTime are helper functions on top of @ref glfwGetTimerFrequency and @ref glfwGetTimerValue.
The resolution of the timer is system dependent, but is usually on the order of a few micro- or nanoseconds. It uses the highest-resolution monotonic time source on each supported platform.
@return The current time, in seconds, or zero if an
error
(@ref error_handling) occurred.
@errors Possible errors include @ref GLFW_NOT_INITIALIZED.
@thread_safety This function may be called from any thread. Reading and writing of the internal base time is not atomic, so it needs to be externally synchronized with calls to @ref glfwSetTime.
@sa @ref time
@since Added in version 1.0.
@ingroup input
GLFWAPI double glfwGetTime(void)
Implementation
double glfwGetTime() {
final glfwGetTimeLookupFunction = libglfw
.lookupFunction<Double Function(), double Function()>('glfwGetTime');
return glfwGetTimeLookupFunction();
}