X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fsoc_pollux.c;h=2cda031c413c0039fb9274d757a4c2b16bdc90c1;hb=8af2da727390116fe2623fc2ddab7c164114b589;hp=b6ec9ab138e9fe04586a1949aeaaf3641d02b841;hpb=b0eec79345b2587d433e782a4bbc6f4d1478c09b;p=libpicofe.git diff --git a/gp2x/soc_pollux.c b/gp2x/soc_pollux.c index b6ec9ab..2cda031 100644 --- a/gp2x/soc_pollux.c +++ b/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)