Make timer init part of platform API

This is part of runtime platform selection because the null backend
needs the timer implementation for the current OS.
This commit is contained in:
Camilla Löwy
2021-07-16 13:53:31 +02:00
parent 6d51b39106
commit e31deedc99
13 changed files with 10 additions and 44 deletions
+2 -9
View File
@@ -34,12 +34,10 @@
//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
// Initialise timer
//
void _glfwInitTimerPOSIX(void)
void _glfwPlatformInitTimer(void)
{
_glfw.timer.posix.clock = CLOCK_REALTIME;
_glfw.timer.posix.frequency = 1000000000;
@@ -51,11 +49,6 @@ void _glfwInitTimerPOSIX(void)
#endif
}
//////////////////////////////////////////////////////////////////////////
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
uint64_t _glfwPlatformGetTimerValue(void)
{
struct timespec ts;