return (int64)((t - g_zero_timestamp) * tick_to_ns);
}
-// TODO lazy configuration flags
-static bool param_traceEnable = utils::getConfigurationParameterBool("OPENCV_TRACE", false);
+static bool getParameterTraceEnable()
+{
+ static bool param_traceEnable = utils::getConfigurationParameterBool("OPENCV_TRACE", false);
+ return param_traceEnable;
+}
+// TODO lazy configuration flags
static int param_maxRegionDepthOpenCV = (int)utils::getConfigurationParameterSizeT("OPENCV_TRACE_DEPTH_OPENCV", 1);
static int param_maxRegionChildrenOpenCV = (int)utils::getConfigurationParameterSizeT("OPENCV_TRACE_MAX_CHILDREN_OPENCV", 1000);
static int param_maxRegionChildren = (int)utils::getConfigurationParameterSizeT("OPENCV_TRACE_MAX_CHILDREN", 10000);
CV_LOG("TraceManager ctor: " << (void*)this);
CV_LOG("TraceManager configure()");
- activated = param_traceEnable;
+ activated = getParameterTraceEnable();
if (activated)
trace_storage.reset(new SyncTraceStorage(std::string(param_traceLocation) + ".txt"));