X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fposix%2FItimer.c;h=715cf5af3c624ef9cd148386af9fa9a1d3fa9f3a;hb=3cdb0ada5aecbcbe940bacf577c02c41bc65c629;hp=83ed84d6ef02787d171a0131e0a7fff50d2b366f;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/rts/posix/Itimer.c b/rts/posix/Itimer.c index 83ed84d..715cf5a 100644 --- a/rts/posix/Itimer.c +++ b/rts/posix/Itimer.c @@ -22,6 +22,7 @@ #include "Ticker.h" #include "posix/Itimer.h" #include "Proftimer.h" +#include "Storage.h" #include "Schedule.h" #include "posix/Select.h" @@ -221,6 +222,6 @@ getourtimeofday(void) struct timeval tv; gettimeofday(&tv, (struct timezone *) NULL); // 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); + return ((lnat)tv.tv_sec * 1000 / RtsFlags.MiscFlags.tickInterval + + (lnat)tv.tv_usec / (RtsFlags.MiscFlags.tickInterval * 1000)); }