diff options
author | Ian Lynagh <igloo@earth.li> | 2006-09-05 14:15:45 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2006-09-05 14:15:45 +0000 |
commit | 93db1991b5cacf8357493a2e17fbbfb485f3205b (patch) | |
tree | 4a9ebcc89dfbf9a106d42ec63b764cc7d0abdce2 /rts/posix/Itimer.c | |
parent | c18587da71e16b581c293baee8d4af119b108da7 (diff) | |
download | haskell-93db1991b5cacf8357493a2e17fbbfb485f3205b.tar.gz |
new RTS flag: -V to modify the resolution of the RTS timer
Fixed version of an old patch by Simon Marlow. His description read:
Also, now an arbitrarily short context switch interval may now be
specified, as we increase the RTS ticker's resolution to match the
requested context switch interval. This also applies to +RTS -i (heap
profiling) and +RTS -I (the idle GC timer). +RTS -V is actually only
required for increasing the resolution of the profile timer.
Diffstat (limited to 'rts/posix/Itimer.c')
-rw-r--r-- | rts/posix/Itimer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/posix/Itimer.c b/rts/posix/Itimer.c index 83ed84d6ef..0f0b1e977e 100644 --- a/rts/posix/Itimer.c +++ b/rts/posix/Itimer.c @@ -221,6 +221,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)); } |