mirror of
https://github.com/raysan5/raylib.git
synced 2026-05-13 17:04:31 +00:00
REVIEWED: GetTime(), small addition for RPI Pico 2
This commit is contained in:
@@ -374,6 +374,8 @@ double GetTime(void)
|
||||
unsigned long long nanoSeconds = (unsigned long long)ts.tv_sec*1000000000LLU + (unsigned long long)ts.tv_nsec;
|
||||
|
||||
time = (double)(nanoSeconds - CORE.Time.base)*1e-9; // Elapsed time since InitTimer()
|
||||
#elif defined(PICO_RP2350)
|
||||
time = (double)to_ms_since_boot(get_absolute_time())/1000.0;
|
||||
#endif
|
||||
return time;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user