REVIEWED: GetTime(), small addition for RPI Pico 2
This commit is contained in:
parent
c4b4fcc17e
commit
f35f4b9fad
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user