diff --git a/Library/MeasureNet.cpp b/Library/MeasureNet.cpp index f59693eb..7c5b7472 100644 --- a/Library/MeasureNet.cpp +++ b/Library/MeasureNet.cpp @@ -36,8 +36,6 @@ extern CRainmeter* Rainmeter; ** */ CMeasureNet::CMeasureNet(CMeterWindow* meterWindow, const WCHAR* name) : CMeasure(meterWindow, name), - m_CurrentTraffic(), - m_TrafficValue(), m_Interface(), m_Cumulative(false) { @@ -51,27 +49,6 @@ CMeasureNet::~CMeasureNet() { } -/* -** Checks if Action should be executed. -** -*/ -void CMeasureNet::UpdateValue() -{ - if (m_MeterWindow) - { - if (!m_TrafficAction.empty()) - { - if (m_CurrentTraffic > m_TrafficValue) - { - m_CurrentTraffic = 0; - Rainmeter->ExecuteCommand(m_TrafficAction.c_str(), m_MeterWindow); - } - - m_CurrentTraffic += m_Value; - } - } -} - /* ** Reads the tables for all net interfaces ** @@ -473,9 +450,6 @@ void CMeasureNet::ReadOptions(CConfigParser& parser, const WCHAR* section, NET n Rainmeter->SetNetworkStatisticsTimer(); } - m_TrafficValue = parser.ReadFloat(section, L"TrafficValue", 0.0); - m_TrafficAction = parser.ReadString(section, L"TrafficAction", L"", false); - if (maxValue == 0) { m_MaxValue = 1; diff --git a/Library/MeasureNet.h b/Library/MeasureNet.h index fd10b80e..746367fe 100644 --- a/Library/MeasureNet.h +++ b/Library/MeasureNet.h @@ -54,16 +54,12 @@ public: protected: void ReadOptions(CConfigParser& parser, const WCHAR* section, CMeasureNet::NET net); - void UpdateValue(); ULONG64 GetNetOctets(NET net); ULONG64 GetNetStatsValue(NET net); - double m_CurrentTraffic; - double m_TrafficValue; UINT m_Interface; bool m_Cumulative; - std::wstring m_TrafficAction; static std::vector c_OldStatValues; static std::vector c_StatValues;