GLFW  3.0.2
A multi-platform library for OpenGL, window and input
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
Functions
Time input

Functions

double glfwGetTime (void)
 Returns the value of the GLFW timer. More...
 
void glfwSetTime (double time)
 Sets the GLFW timer. More...
 

Detailed Description

Function Documentation

double glfwGetTime ( void  )

This function returns the value of the GLFW timer. Unless the timer has been set using glfwSetTime, the timer measures time elapsed since GLFW was initialized.

Returns
The current value, in seconds, or zero if an error occurred.
Remarks
This function may be called from secondary threads.
Note
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.
void glfwSetTime ( double  time)

This function sets the value of the GLFW timer. It then continues to count up from that value.

Parameters
[in]timeThe new value, in seconds.
Note
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.