From 372eed190366cdf5df052b367593ca85dc3c9f4f Mon Sep 17 00:00:00 2001 From: shadow3aaa Date: Fri, 15 Nov 2024 16:37:37 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E9=A1=B6=E5=B1=82=E5=BA=94=E7=94=A8=E7=9B=91=E8=A7=86=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/framework/scheduler/looper/mod.rs | 6 +++--- src/framework/scheduler/topapp.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/framework/scheduler/looper/mod.rs b/src/framework/scheduler/looper/mod.rs index 8e425e77..1ccc7f72 100644 --- a/src/framework/scheduler/looper/mod.rs +++ b/src/framework/scheduler/looper/mod.rs @@ -26,7 +26,7 @@ use log::debug; use log::info; use policy::{controll::calculate_control, ControllerParams}; -use super::{thermal::Thermal, topapp::TimedWatcher, FasData}; +use super::{thermal::Thermal, topapp::TopAppsWatcher, FasData}; use crate::{ framework::{ config::Config, @@ -73,7 +73,7 @@ pub struct Looper { node: Node, extension: Extension, therminal: Thermal, - windows_watcher: TimedWatcher, + windows_watcher: TopAppsWatcher, cleaner: Cleaner, fas_state: FasState, controller_state: ControllerState, @@ -97,7 +97,7 @@ impl Looper { node, extension, therminal: Thermal::new().unwrap(), - windows_watcher: TimedWatcher::new(), + windows_watcher: TopAppsWatcher::new(), cleaner: Cleaner::new(), fas_state: FasState { mode: Mode::Balance, diff --git a/src/framework/scheduler/topapp.rs b/src/framework/scheduler/topapp.rs index 9b223d14..96f28df1 100644 --- a/src/framework/scheduler/topapp.rs +++ b/src/framework/scheduler/topapp.rs @@ -45,13 +45,13 @@ impl WindowsInfo { } } -pub struct TimedWatcher { +pub struct TopAppsWatcher { windows_dumper: Dumpsys, cache: WindowsInfo, last_refresh: Instant, } -impl TimedWatcher { +impl TopAppsWatcher { pub fn new() -> Self { Self { windows_dumper: Dumpsys::new("window").unwrap(),