性能优化

This commit is contained in:
zhongluofeng
2026-08-06 10:33:16 +08:00
parent c7578a2e6b
commit e66c53e66d
105 changed files with 7273 additions and 5002 deletions
+3 -3
View File
@@ -95,9 +95,9 @@ impl NetworkMonitor {
};
// emit 给前端(失败忽略:窗口可能未就绪)
let _ = app.emit("monitor-network", &speed);
let _ = app.emit(crate::constants::events::MONITOR_NETWORK, &speed);
}
eprintln!("[network] 网速采样任务已退出");
crate::logger::log_info("network", "网速采样任务已退出");
});
}
@@ -116,7 +116,7 @@ impl Default for NetworkMonitor {
/// Tauri 命令:获取网速监控是否运行
#[tauri::command]
pub fn network_monitor_status(
pub fn network_status(
state: tauri::State<'_, NetworkMonitor>,
) -> bool {
state.running.load(Ordering::SeqCst)