SDL: PSP: improve performance counter res to us granularity (thanks @rofl0r!)

From 3d96c2426f3291d464e7579cbffc47ef5e418566 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 23 Mar 2024 09:34:07 -0700
Subject: [PATCH] PSP: improve performance counter res to us granularity
 (thanks @rofl0r!)

---
 src/timer/psp/SDL_systimer.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/timer/psp/SDL_systimer.c b/src/timer/psp/SDL_systimer.c
index 9df7c11a412fa..b91ea244a0d3a 100644
--- a/src/timer/psp/SDL_systimer.c
+++ b/src/timer/psp/SDL_systimer.c
@@ -27,23 +27,19 @@
 #include <time.h>
 #include <sys/time.h>
 #include <pspthreadman.h>
+#include <psprtc.h>
 
 
 Uint64 SDL_GetPerformanceCounter(void)
 {
     Uint64 ticks;
-	struct timeval now;
-
-	gettimeofday(&now, NULL);
-	ticks = now.tv_sec;
-	ticks *= SDL_US_PER_SECOND;
-	ticks += now.tv_usec;
+    sceRtcGetCurrentTick(&ticks);
     return ticks;
 }
 
 Uint64 SDL_GetPerformanceFrequency(void)
 {
-    return SDL_US_PER_SECOND;
+    return sceRtcGetTickResolution();
 }
 
 void SDL_DelayNS(Uint64 ns)