mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: make format of ExecutionTime = ... output configurable (issue #788)
- controlled by the the 'printExecutionFormat' InfoSwitch in
etc/controlDict
// Style for "ExecutionTime = " output
// - 0 = seconds (with trailing 's')
// - 1 = day-hh:mm:ss
ExecutionTime = 112135.2 s ClockTime = 113017 s
ExecutionTime = 1-07:08:55.20 ClockTime = 1-07:23:37
- Callable via the new Time::printExecutionTime() method,
which also helps to reduce clutter in the applications.
Eg,
runTime.printExecutionTime(Info);
vs
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
--
ENH: return elapsedClockTime() and clockTimeIncrement as double
- previously returned as time_t, which is less portable.
This commit is contained in:
@ -217,7 +217,7 @@ bool Foam::timeControl::execute()
|
||||
{
|
||||
label executionIndex = label
|
||||
(
|
||||
returnReduce(label(time_.elapsedClockTime()), maxOp<label>())
|
||||
returnReduce(time_.elapsedClockTime(), maxOp<double>())
|
||||
/interval_
|
||||
);
|
||||
if (executionIndex > executionIndex_)
|
||||
|
||||
Reference in New Issue
Block a user