diff --git a/gc/ogc/timesupp.h b/gc/ogc/timesupp.h index ab5ceac..a284192 100644 --- a/gc/ogc/timesupp.h +++ b/gc/ogc/timesupp.h @@ -48,7 +48,11 @@ extern "C" { #endif -u32 gettick(void); +static inline u32 gettick(void) +{ + return __builtin_ppc_mftb(); +} + u64 gettime(void); void settime(u64 time); diff --git a/libogc/timesupp.c b/libogc/timesupp.c index 373e60b..b315da2 100644 --- a/libogc/timesupp.c +++ b/libogc/timesupp.c @@ -9,16 +9,6 @@ #include -u32 gettick(void) -{ - u32 result; - __asm__ __volatile__ ( - "mftb %0\n" - : "=r" (result) - ); - return result; -} - u64 gettime(void) { u32 tmp;