mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Fix Value.h
This commit is contained in:
@@ -54,19 +54,19 @@ class CalculatedValue : public UntypedValue, public Value<T>
|
|||||||
T Get() override
|
T Get() override
|
||||||
{
|
{
|
||||||
if (checkInterval < 2) {
|
if (checkInterval < 2) {
|
||||||
PerformanceMonitorOperation* pmo = sPerformanceMonitor->start(PERF_MON_VALUE, this->getName(), this->context ? &this->context->performanceStack : nullptr);
|
// PerformanceMonitorOperation* pmo = sPerformanceMonitor->start(PERF_MON_VALUE, this->getName(), this->context ? &this->context->performanceStack : nullptr);
|
||||||
value = Calculate();
|
value = Calculate();
|
||||||
if (pmo)
|
// if (pmo)
|
||||||
pmo->finish();
|
// pmo->finish();
|
||||||
} else {
|
} else {
|
||||||
time_t now = getMSTime();
|
time_t now = getMSTime();
|
||||||
if (!lastCheckTime || now - lastCheckTime >= checkInterval)
|
if (!lastCheckTime || now - lastCheckTime >= checkInterval)
|
||||||
{
|
{
|
||||||
lastCheckTime = now;
|
lastCheckTime = now;
|
||||||
PerformanceMonitorOperation* pmo = sPerformanceMonitor->start(PERF_MON_VALUE, this->getName(), this->context ? &this->context->performanceStack : nullptr);
|
// PerformanceMonitorOperation* pmo = sPerformanceMonitor->start(PERF_MON_VALUE, this->getName(), this->context ? &this->context->performanceStack : nullptr);
|
||||||
value = Calculate();
|
value = Calculate();
|
||||||
if (pmo)
|
// if (pmo)
|
||||||
pmo->finish();
|
// pmo->finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
|||||||
Reference in New Issue
Block a user