--- old/src/share/vm/runtime/os.cpp Wed Mar 26 10:02:18 2014 +++ new/src/share/vm/runtime/os.cpp Wed Mar 26 10:02:15 2014 @@ -937,7 +937,13 @@ // NOTE: It tends to crash after a SEGV if we want to printf("%f",...) in // Linux. Must be a bug in glibc ? Workaround is to round "t" to int // before printf. We lost some precision, but who cares? - st->print_cr("elapsed time: %d seconds", (int)t); + int eltime = (int)t; // elapsed time in seconds + int eldays, elhours, elminutes, elseconds; // for printing elapsed time in a humanly readable format + eldays = eltime / 86400; + elhours = (eltime - eldays * 86400) / 3600; + elminutes = (eltime - eldays * 86400 - elhours * 3600) / 60; + elseconds = (eltime - eldays * 86400 - elhours * 3600 - elminutes * 60); + st->print_cr("elapsed time: %d seconds (%dd %dh %dm %ds)", eltime, eldays, elhours, elminutes, elseconds); } // moved from debug.cpp (used to be find()) but still called from there