glfwSetTime function

void glfwSetTime(
  1. double time
)

! @brief Sets the GLFW time.

This function sets the current GLFW time, in seconds. The value must be a positive finite number less than or equal to 18446744073.0, which is approximately 584.5 years.

This function and @ref glfwGetTime are helper functions on top of @ref glfwGetTimerFrequency and @ref glfwGetTimerValue.

@paramin time The new value, in seconds.

@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_INVALID_VALUE.

@remark The upper limit of GLFW time is calculated as floor((264 - 1) / 109) and is due to implementations storing nanoseconds in 64 bits. The limit may be increased in the future.

@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 glfwGetTime.

@sa @ref time

@since Added in version 2.2.

@ingroup input

GLFWAPI void glfwSetTime(double time)

Implementation

void glfwSetTime(double time) {
  final glfwSetTimeLookupFunction = libglfw.lookupFunction<
      Void Function(Double time), void Function(double time)>('glfwSetTime');
  return glfwSetTimeLookupFunction(time);
}