forked from lix-project/lix
87b32bab05
This does a few enums; the rest will be gotten in subsequent commits.
19 lines
675 B
C++
19 lines
675 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(Verbosity::Info, "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(Verbosity::Info, "function-trace exited %1% at %2%", pos, ns.count());
|
|
}
|
|
|
|
}
|