Skip to content
  • Mark OLESEN's avatar
    ENH: make format of ExecutionTime = ... output configurable (issue #788) · dd8341f6
    Mark OLESEN authored
    - 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.
    dd8341f6