diff options
| author | Ray <[email protected]> | 2020-02-04 17:06:08 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2020-02-04 17:06:08 +0100 |
| commit | 1184db83f71dcafe00aa5d822d1684e8705ed7a1 (patch) | |
| tree | e0a9f563756a66feef361a5928397e2e4ea5a519 /src | |
| parent | ca600b44a0123723d3a50a885eda0e97674c8981 (diff) | |
| download | raylib-1184db83f71dcafe00aa5d822d1684e8705ed7a1.tar.gz raylib-1184db83f71dcafe00aa5d822d1684e8705ed7a1.zip | |
Review GetCurrentTime()
Diffstat (limited to 'src')
| -rw-r--r-- | src/gestures.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gestures.h b/src/gestures.h index eeb1f73a..9b3600db 100644 --- a/src/gestures.h +++ b/src/gestures.h @@ -532,7 +532,7 @@ static double GetCurrentTime(void) // NOTE: Only for Linux-based systems struct timespec now; clock_gettime(CLOCK_MONOTONIC, &now); - unsigned long long int nowTime = ((unsigned long long int))now.tv_sec*1000000000LLU + ((unsigned long long int))now.tv_nsec; // Time in nanoseconds + unsigned long long int nowTime = (unsigned long long int)now.tv_sec*1000000000LLU + (unsigned long long int)now.tv_nsec; // Time in nanoseconds time = ((double)nowTime/1000000.0); // Time in miliseconds #endif @@ -548,7 +548,7 @@ static double GetCurrentTime(void) // NOTE: OS X does not have clock_gettime(), using clock_get_time() clock_get_time(cclock, &now); mach_port_deallocate(mach_task_self(), cclock); - unsigned long long int nowTime = ((unsigned long long int))now.tv_sec*1000000000LLU + ((unsigned long long int))now.tv_nsec; // Time in nanoseconds + unsigned long long int nowTime = (unsigned long long int)now.tv_sec*1000000000LLU + (unsigned long long int)now.tv_nsec; // Time in nanoseconds time = ((double)nowTime/1000000.0); // Time in miliseconds #endif |
