mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 14:56:15 +02:00
15abb2aa2b
Not a regular git revert as there have been many merges and things.
18 lines
659 B
C++
18 lines
659 B
C++
#include "function-trace.hh"
|
|
#include "logging.hh"
|
|
|
|
namespace nix {
|
|
|
|
FunctionCallTrace::FunctionCallTrace(const Pos & pos) : pos(pos) {
|
|
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
|
auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
|
|
printMsg(lvlInfo, "function-trace entered %1% at %2%", pos, ns.count());
|
|
}
|
|
|
|
FunctionCallTrace::~FunctionCallTrace() {
|
|
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
|
auto ns = std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
|
|
printMsg(lvlInfo, "function-trace exited %1% at %2%", pos, ns.count());
|
|
}
|
|
|
|
}
|