本文整理汇总了C++中TimerPtr::finish方法的典型用法代码示例。如果您正苦于以下问题:C++ TimerPtr::finish方法的具体用法?C++ TimerPtr::finish怎么用?C++ TimerPtr::finish使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimerPtr
的用法示例。
在下文中一共展示了TimerPtr::finish方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadGraphFrom
void GraphIO::loadGraphFrom(const YAML::Node& doc)
{
TimerPtr timer = getProfiler()->getTimer("load graph");
timer->restart();
SemanticVersion version;
if(doc["version"].IsDefined()) {
version = doc["version"].as<SemanticVersion>();
} else {
// with 0.9.7 versioning was introduced, so assume that the version was 0.9.6
version = SemanticVersion(0, 9, 6);
}
graph_.getLocalGraph()->beginTransaction();
{
auto interlude = timer->step("load nodes");
loadNodes(doc, version);
}
{
auto interlude = timer->step("load connections");
loadConnections(doc, version);
}
graph_.getLocalGraph()->finalizeTransaction();
{
auto interlude = timer->step("load view");
loadViewRequest(graph_, doc);
}
timer->finish();
}
示例2: saveGraphTo
void GraphIO::saveGraphTo(YAML::Node& yaml)
{
TimerPtr timer = getProfiler()->getTimer("save graph");
timer->restart();
yaml["version"] = csapex::info::CSAPEX_VERSION;
saveNodes(yaml);
saveConnections(yaml);
{
auto interlude = timer->step("save view");
saveViewRequest(graph_, yaml);
}
timer->finish();
}