Support retrieving elapsed duration from a scoped profiler
This commit is contained in:
parent
de1a454079
commit
352d03ed3f
1 changed files with 5 additions and 0 deletions
|
|
@ -24,6 +24,11 @@ namespace psemek::prof
|
|||
push(name, std::chrono::duration_cast<std::chrono::duration<double>>(duration));
|
||||
}
|
||||
|
||||
double duration() const
|
||||
{
|
||||
return clock_.count();
|
||||
}
|
||||
|
||||
private:
|
||||
util::clock<std::chrono::duration<double>, std::chrono::high_resolution_clock> clock_;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue