mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Minor X11 library struct changes.
This commit is contained in:
+4
-4
@@ -40,11 +40,11 @@ void _glfwInitTimer(void)
|
||||
struct timeval tv;
|
||||
|
||||
// "Resolution" is 1 us
|
||||
_glfwLibrary.X11.Timer.resolution = 1e-6;
|
||||
_glfwLibrary.X11.timer.resolution = 1e-6;
|
||||
|
||||
// Set start-time for timer
|
||||
gettimeofday(&tv, NULL);
|
||||
_glfwLibrary.X11.Timer.t0 = (long long) tv.tv_sec * (long long) 1000000 +
|
||||
_glfwLibrary.X11.timer.t0 = (long long) tv.tv_sec * (long long) 1000000 +
|
||||
(long long) tv.tv_usec;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ double _glfwPlatformGetTime(void)
|
||||
t = (long long) tv.tv_sec * (long long) 1000000 +
|
||||
(long long) tv.tv_usec;
|
||||
|
||||
return (double)(t - _glfwLibrary.X11.Timer.t0) * _glfwLibrary.X11.Timer.resolution;
|
||||
return (double)(t - _glfwLibrary.X11.timer.t0) * _glfwLibrary.X11.timer.resolution;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,6 +84,6 @@ void _glfwPlatformSetTime(double t)
|
||||
(long long) tv.tv_usec;
|
||||
|
||||
// Calulate new starting time
|
||||
_glfwLibrary.X11.Timer.t0 = t0 - (long long)(t / _glfwLibrary.X11.Timer.resolution);
|
||||
_glfwLibrary.X11.timer.t0 = t0 - (long long)(t / _glfwLibrary.X11.timer.resolution);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user