From 58f2ca239cd747eb137e0cbbed8c8c5d4e553c9a Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Sat, 24 Aug 2024 22:19:14 +0300 Subject: [PATCH] Fix conversion of clock() return value to actual time units --- disasmtool/disasmtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disasmtool/disasmtool.c b/disasmtool/disasmtool.c index d3469b5..b480f5f 100644 --- a/disasmtool/disasmtool.c +++ b/disasmtool/disasmtool.c @@ -1286,7 +1286,7 @@ handle_disasm( if (Options->Stats) { printf("Disassembled %llu instructions in %llums, %4.4f instructions/second, %4.6f clocks/instruction, average ilen %4.6f bytes\n", - icount, end - start, icount / (double)(end - start) * 1000, itotal / (double)icount, tilen / (double)ticount); + icount, (end - start) * 1000 / CLOCKS_PER_SEC, icount / ((double)(end - start) / CLOCKS_PER_SEC), itotal / (double)icount, tilen / (double)ticount); } }