mirror of
https://github.com/glfw/glfw.git
synced 2026-08-27 22:25:54 +02:00
Add glfwGetTimerValue and glfwGetTimerFrequency
This adds raw timer access to the public API and builds the floating-point time functions on top. It also makes the GLFWuint64 type public.
This commit is contained in:
@@ -554,6 +554,21 @@ glfwSetTime(4.0);
|
||||
|
||||
This sets the timer to the specified time, in seconds.
|
||||
|
||||
You can also access the raw timer value, in 1 / frequency seconds,
|
||||
with @ref glfwGetTimerValue.
|
||||
|
||||
@code
|
||||
GLFWuint64 value = glfwGetTimerValue();
|
||||
@endcode
|
||||
|
||||
The frequency of the raw timer varies depending on what time sources are
|
||||
available on the machine. You can query its frequency, in Hz, with @ref
|
||||
glfwGetTimerFrequency.
|
||||
|
||||
@code
|
||||
GLFWuint64 freqency = glfwGetTimerFrequency();
|
||||
@endcode
|
||||
|
||||
|
||||
@section clipboard Clipboard input and output
|
||||
|
||||
|
||||
@@ -37,6 +37,12 @@ GLFW now supports window maximization with @ref glfwMaximizeWindow and the
|
||||
GLFW now supports giving windows input focus with @ref glfwFocusWindow.
|
||||
|
||||
|
||||
@subsection news_32_timer Raw timer access
|
||||
|
||||
GLFW now supports raw timer values with @ref glfwGetTimerValue and @ref
|
||||
glfwGetTimerFrequency.
|
||||
|
||||
|
||||
@section news_31 New features in 3.1
|
||||
|
||||
These are the release highlights. For a full list of changes see the
|
||||
|
||||
Reference in New Issue
Block a user