Skip to content
Snippets Groups Projects
Commit fafe43bd authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1997-10-09 09:08:06 by simonm]

Avoid divide by zero if the measured elapsed time is 0.00 seconds.
parent 5fe86713
No related branches found
No related tags found
No related merge requests found
......@@ -456,6 +456,11 @@ stat_exit(I_ alloc)
StgDouble time = usertime();
StgDouble etime = elapsedtime();
/* avoid divide by zero if time is measured as 0.00 seconds -- SDM */
if (time == 0.0) time = 0.0001;
if (etime == 0.0) etime = 0.0001;
if (RTSflags.GcFlags.giveStats) {
fprintf(sf, "%8ld\n\n", alloc*sizeof(W_));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment