Expose GetTime() function to users
Monotonic time since InitWindow() could be retrieved with this function.
This commit is contained in:
parent
a7de5bf6d9
commit
5290390494
3 changed files with 33 additions and 32 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue