This commit is contained in:
blueloveTH 2024-06-09 22:40:53 +08:00
parent ec366c15c6
commit 907a1b7713
2 changed files with 7 additions and 0 deletions

View File

@ -1,7 +1,9 @@
#pragma once #pragma once
#include "pocketpy/common/config.h"
#include "pocketpy/interpreter/frame.hpp" #include "pocketpy/interpreter/frame.hpp"
#if PK_ENABLE_PROFILER
#include <ctime> #include <ctime>
namespace pkpy { namespace pkpy {
@ -38,3 +40,5 @@ struct LineProfiler {
}; };
} // namespace pkpy } // namespace pkpy
#endif

View File

@ -1,5 +1,6 @@
#include "pocketpy/interpreter/profiler.hpp" #include "pocketpy/interpreter/profiler.hpp"
#if PK_ENABLE_PROFILER
namespace pkpy { namespace pkpy {
static std::string left_pad(std::string s, int width) { static std::string left_pad(std::string s, int width) {
@ -126,3 +127,5 @@ LineProfiler::~LineProfiler() {
} }
} // namespace pkpy } // namespace pkpy
#endif