add timer for shortest path queries

This commit is contained in:
Sébastien Loriot 2014-10-28 14:25:52 +01:00
parent 7bf8ec26b3
commit e6077bb7b0
1 changed files with 4 additions and 3 deletions

View File

@ -339,9 +339,10 @@ bool Scene_polyhedron_shortest_path_item::run_point_select(const Ray_3& ray)
m_messages->information(tr("Computing shortest path polyline...")); m_messages->information(tr("Computing shortest path polyline..."));
QTime time;
time.start();
m_shortestPaths->shortest_path_points_to_source_points(faceLocation.first, faceLocation.second, std::back_inserter(polylines->polylines.back())); m_shortestPaths->shortest_path_points_to_source_points(faceLocation.first, faceLocation.second, std::back_inserter(polylines->polylines.back()));
std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
m_messages->information(tr("Done"));
polylines->setName(tr("%1 (shortest path)").arg(polyhedron_item()->name())); polylines->setName(tr("%1 (shortest path)").arg(polyhedron_item()->name()));
polylines->setColor(Qt::red); polylines->setColor(Qt::red);