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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user