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:
Camilla Berglund
2016-03-06 11:38:55 +01:00
parent 8221aadea3
commit 31f67dd3cc
14 changed files with 148 additions and 96 deletions
+6 -11
View File
@@ -47,13 +47,6 @@
#define GLFW_INCLUDE_NONE
#include "../include/GLFW/glfw3.h"
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef unsigned __int64 GLFWuint64;
#else
#include <stdint.h>
typedef uint64_t GLFWuint64;
#endif
typedef int GLFWbool;
typedef struct _GLFWwndconfig _GLFWwndconfig;
@@ -432,6 +425,8 @@ struct _GLFWlibrary
_GLFWmonitor** monitors;
int monitorCount;
GLFWuint64 timerOffset;
struct {
GLFWbool available;
void* handle;
@@ -596,15 +591,15 @@ const unsigned char* _glfwPlatformGetJoystickButtons(int joy, int* count);
*/
const char* _glfwPlatformGetJoystickName(int joy);
/*! @copydoc glfwGetTime
/*! @copydoc glfwGetTimerValue
* @ingroup platform
*/
double _glfwPlatformGetTime(void);
GLFWuint64 _glfwPlatformGetTimerValue(void);
/*! @copydoc glfwSetTime
/*! @copydoc glfwGetTimerFrequency
* @ingroup platform
*/
void _glfwPlatformSetTime(double time);
GLFWuint64 _glfwPlatformGetTimerFrequency(void);
/*! @ingroup platform
*/