diff options
Diffstat (limited to 'src/utl_cpuu.cpp')
-rwxr-xr-x | src/utl_cpuu.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/utl_cpuu.cpp b/src/utl_cpuu.cpp index 47c78c8e..c01326d6 100755 --- a/src/utl_cpuu.cpp +++ b/src/utl_cpuu.cpp @@ -42,10 +42,11 @@ void CCpuUtlCp::Update(){ if ( m_dpcpu->sample_data() ) { m_work++; } - if (m_ticks==100) { + if (m_ticks==100000) { /* LPF*/ - m_cpu_util_lpf = (m_cpu_util_lpf*0.75)+((double)m_work*0.25); - AppendHistory(m_work); + double work = (m_work / double(m_ticks)) * 100; + m_cpu_util_lpf = (m_cpu_util_lpf*0.75)+(work*0.25); + AppendHistory(work); m_ticks=0; m_work=0; } |