Skip to content

Commit 50a716c

Browse files
authored
Updated rcore.c, renamed 'time' to 'nanoSeconds' (#2816)
* Updated rcore.c, renamed 'time' to 'time_nsec' When PLATFORM_ANDROID, PLATFORM_RPI or PLATFORM_DRM were defined, there is a compilation error to redefinition of the variable 'time', so the second instance of 'time' was changed to 'time_nsec' which both fixes the name collision and more accurately describes what that variable represents. * Renamed 'time_nsec' to 'nanoSeconds'
1 parent 57bd845 commit 50a716c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rcore.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2763,9 +2763,9 @@ double GetTime(void)
27632763
#if defined(PLATFORM_ANDROID) || defined(PLATFORM_RPI) || defined(PLATFORM_DRM)
27642764
struct timespec ts = { 0 };
27652765
clock_gettime(CLOCK_MONOTONIC, &ts);
2766-
unsigned long long int time = (unsigned long long int)ts.tv_sec*1000000000LLU + (unsigned long long int)ts.tv_nsec;
2766+
unsigned long long int nanoSeconds = (unsigned long long int)ts.tv_sec*1000000000LLU + (unsigned long long int)ts.tv_nsec;
27672767

2768-
time = (double)(time - CORE.Time.base)*1e-9; // Elapsed time since InitTimer()
2768+
time = (double)(nanoSeconds - CORE.Time.base)*1e-9; // Elapsed time since InitTimer()
27692769
#endif
27702770
return time;
27712771
}

0 commit comments

Comments
 (0)