X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FItimer.c;h=d4592c75f9f5af0b813f8ad36c9482529e8d835e;hb=0cc009952787f2112365100a04dc73aa3d0fca67;hp=1f98659a62cd6f1f233d2a6a529ebf71369980d1;hpb=94e06463420582cc2d336b39a297e82af39e4cc4;p=ghc-hetmet.git diff --git a/ghc/rts/Itimer.c b/ghc/rts/Itimer.c index 1f98659..d4592c7 100644 --- a/ghc/rts/Itimer.c +++ b/ghc/rts/Itimer.c @@ -196,12 +196,12 @@ unblock_vtalrm_signal(void) /* gettimeofday() takes around 1us on our 500MHz PIII. Since we're * only calling it 50 times/s, it shouldn't have any great impact. */ -unsigned int +lnat getourtimeofday(void) { struct timeval tv; gettimeofday(&tv, (struct timezone *) NULL); - return (tv.tv_sec * TICK_FREQUENCY + - tv.tv_usec * TICK_FREQUENCY / 1000000); + // cast to lnat because nat may be 64 bit when int is only 32 bit + return ((lnat)tv.tv_sec * TICK_FREQUENCY + + (lnat)tv.tv_usec * TICK_FREQUENCY / 1000000); } -