X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fgp2x%2Fsoc_pollux.c;h=2cda031c413c0039fb9274d757a4c2b16bdc90c1;hb=d8afe7b8a7f4e5c359a2d347f0dd182575cf66fc;hp=b6ec9ab138e9fe04586a1949aeaaf3641d02b841;hpb=b24e0f6ce6e8a59ba43597520709ca79fa36ff8e;p=picodrive.git diff --git a/platform/gp2x/soc_pollux.c b/platform/gp2x/soc_pollux.c index b6ec9ab..2cda031 100644 --- a/platform/gp2x/soc_pollux.c +++ b/platform/gp2x/soc_pollux.c @@ -219,9 +219,10 @@ unsigned int gp2x_get_ticks_us_(void) unsigned int gp2x_get_ticks_ms_(void) { + /* approximate /= 1000 */ unsigned long long v64; - v64 = (unsigned long long)gp2x_get_ticks_us_() * 4195; - return v64 >> 22; + v64 = (unsigned long long)gp2x_get_ticks_us_() * 4294968; + return v64 >> 32; } static void timer_cleanup(void)