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:
@@ -186,7 +186,7 @@ void ViewProviderFemMeshPy::setNodeColor(Py::Dict arg)
|
||||
this->getViewProviderFemMeshPtr()->resetColorByNodeId();
|
||||
}
|
||||
else {
|
||||
Base::TimeInfo Start;
|
||||
Base::TimeElapsed Start;
|
||||
Base::Console().Log(
|
||||
"Start: ViewProviderFemMeshPy::setNodeColor() =================================\n");
|
||||
// std::map<long,App::Color> NodeColorMap;
|
||||
@@ -209,12 +209,12 @@ void ViewProviderFemMeshPy::setNodeColor(Py::Dict arg)
|
||||
App::Color(Py::Float(color[0]), Py::Float(color[1]), Py::Float(color[2]), 0);
|
||||
}
|
||||
Base::Console().Log(" %f: Start ViewProviderFemMeshPy::setNodeColor() call \n",
|
||||
Base::TimeInfo::diffTimeF(Start, Base::TimeInfo()));
|
||||
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
|
||||
|
||||
// this->getViewProviderFemMeshPtr()->setColorByNodeId(NodeColorMap);
|
||||
this->getViewProviderFemMeshPtr()->setColorByNodeId(NodeIds, NodeColors);
|
||||
Base::Console().Log(" %f: Finish ViewProviderFemMeshPy::setNodeColor() call \n",
|
||||
Base::TimeInfo::diffTimeF(Start, Base::TimeInfo()));
|
||||
Base::TimeElapsed::diffTimeF(Start, Base::TimeElapsed()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user