Skip to content

Commit 0075f0f

Browse files
committed
Trace sleep time
1 parent 7233656 commit 0075f0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/pg_tsdtm/pg_dtm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ static void dtm_sleep(timestamp_t interval)
130130
if (firstReportTime == 0) {
131131
firstReportTime = now;
132132
} else {
133-
fprintf(stderr, "Sleep %lu of %lu usec (%f%%)\n", totalSleepTime, now - firstReportTime, totalSleepTime*100.0/firstReportTime);
133+
fprintf(stderr, "Sleep %lu of %lu usec (%f%%)\n", totalSleepTime, now - firstReportTime, totalSleepTime*100.0/(now - firstReportTime));
134134
}
135135
}
136136
#endif

0 commit comments

Comments
 (0)