X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FTimer.c;h=586991a4db88f939576d752bd4e1c79513221ecd;hb=0d88de0b114a391712bc117d42928b49fba4d66a;hp=d56fdb656fb6ace2144a111bf6e493ea7839c39c;hpb=93db1991b5cacf8357493a2e17fbbfb485f3205b;p=ghc-hetmet.git diff --git a/rts/Timer.c b/rts/Timer.c index d56fdb6..586991a 100644 --- a/rts/Timer.c +++ b/rts/Timer.c @@ -17,6 +17,7 @@ #include "Rts.h" #include "RtsFlags.h" #include "Proftimer.h" +#include "Storage.h" #include "Schedule.h" #include "Timer.h" #include "Ticker.h" @@ -41,9 +42,7 @@ static void handle_tick(int unused STG_UNUSED) { -#ifdef PROFILING handleProfTick(); -#endif if (RtsFlags.ConcFlags.ctxtSwitchTicks > 0) { ticks_to_ctxt_switch--; if (ticks_to_ctxt_switch <= 0) { @@ -82,18 +81,19 @@ handle_tick(int unused STG_UNUSED) #endif } -int +void startTimer(void) { -#ifdef PROFILING initProfTimer(); -#endif - - return startTicker(RtsFlags.MiscFlags.tickInterval, handle_tick); + if (RtsFlags.MiscFlags.tickInterval != 0) { + startTicker(RtsFlags.MiscFlags.tickInterval, handle_tick); + } } -int +void stopTimer(void) { - return stopTicker(); + if (RtsFlags.MiscFlags.tickInterval != 0) { + stopTicker(); + } }