From 662454b552472f1fc52f7744b90b4a7002dd32c6 Mon Sep 17 00:00:00 2001 From: TusharGautam29 Date: Thu, 26 Dec 2024 00:57:39 +0530 Subject: [PATCH] Fix documentation for glfwGetTimerValue --- docs/input.md | 7 ++++--- include/GLFW/glfw3.h | 9 ++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/input.md b/docs/input.md index 3ef1aebe..e9250498 100644 --- a/docs/input.md +++ b/docs/input.md @@ -940,9 +940,10 @@ with @ref glfwGetTimerValue. uint64_t value = glfwGetTimerValue(); ``` -This value is in 1 / frequency seconds. The frequency of the raw -timer varies depending on the operating system and hardware. You can query the -frequency, in Hz, with @ref glfwGetTimerFrequency. +This function returns the current value of the raw timer. To get the current time in +1 / frequency seconds, use `glfwGetTimerValue() / glfwGetTimerFrequency()`. +The frequency of the rawtimer varies depending on the operating system and hardware. +You can query the frequency, in Hz, with @ref glfwGetTimerFrequency. ```c uint64_t frequency = glfwGetTimerFrequency(); diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 79b06288..74cff02d 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -6037,9 +6037,12 @@ GLFWAPI void glfwSetTime(double time); /*! @brief Returns the current value of the raw timer. * - * This function returns the current value of the raw timer, measured in - * 1 / frequency seconds. To get the frequency, call @ref - * glfwGetTimerFrequency. + * This function returns the current value of the raw timer. To get the + * current time measured in 1 / frequency seconds, use + * @ref glfwGetTimerValue / @ref glfwGetTimerFrequency. + * To get the frequency, call @ref glfwGetTimerFrequency. + * + * * * @return The value of the timer, or zero if an * [error](@ref error_handling) occurred.