Base: Implement TimeElapsed

Some instances of TimeInfo serve the sole purpose of measuring time
duration. Using system time is unfortunate as it returns wall clock,
which is not guaranteed to be monotonic. Replace such a usage with
the new TimeElapsed class based on steady clock.
This commit is contained in:
Ladislav Michl
2024-01-21 19:00:57 +01:00
parent 159fe5c21f
commit e4d304f934
10 changed files with 93 additions and 52 deletions

View File

@@ -678,13 +678,13 @@ int TaskCheckGeometryResults::goBOPSingleCheck(const TopoDS_Shape& shapeIn, Resu
BOPCheck.CurveOnSurfaceMode() = curveOnSurfaceMode;
#ifdef FC_DEBUG
Base::TimeInfo start_time;
Base::TimeElapsed start_time;
#endif
BOPCheck.Perform();
#ifdef FC_DEBUG
float bopAlgoTime = Base::TimeInfo::diffTimeF(start_time,Base::TimeInfo());
float bopAlgoTime = Base::TimeElapsed::diffTimeF(start_time, Base::TimeElapsed());
std::cout << std::endl << "BopAlgo check time is: " << bopAlgoTime << std::endl << std::endl;
#endif