mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-08 19:06:27 +00:00
Expose GetTime() function to users
Monotonic time since InitWindow() could be retrieved with this function.
This commit is contained in:
@@ -522,7 +522,7 @@ static double GetCurrentTime(void)
|
||||
#if defined(_WIN32)
|
||||
unsigned long long int clockFrequency, currentTime;
|
||||
|
||||
QueryPerformanceFrequency(&clockFrequency);
|
||||
QueryPerformanceFrequency(&clockFrequency); // BE CAREFUL: Costly operation!
|
||||
QueryPerformanceCounter(¤tTime);
|
||||
|
||||
time = (double)currentTime/clockFrequency*1000.0f; // Time in miliseconds
|
||||
@@ -538,8 +538,8 @@ static double GetCurrentTime(void)
|
||||
#endif
|
||||
|
||||
#if defined(__APPLE__)
|
||||
//#define CLOCK_REALTIME CALENDAR_CLOCK
|
||||
//#define CLOCK_MONOTONIC SYSTEM_CLOCK
|
||||
//#define CLOCK_REALTIME CALENDAR_CLOCK // returns UTC time since 1970-01-01
|
||||
//#define CLOCK_MONOTONIC SYSTEM_CLOCK // returns the time since boot time
|
||||
|
||||
clock_serv_t cclock;
|
||||
mach_timespec_t now;
|
||||
|
Reference in New Issue
Block a user