|
@@ -1,8 +1,8 @@
|
|
|
+use crate::cmd::config::EMU_CONFIG;
|
|
|
use crate::ems::service::Service;
|
|
|
use anyhow::Error;
|
|
|
use std::time::Duration;
|
|
|
use tokio::task::JoinHandle;
|
|
|
-use tokio::time::sleep;
|
|
|
|
|
|
pub struct Pcs {}
|
|
|
|
|
@@ -12,14 +12,18 @@ impl Pcs {
|
|
|
println!("PCS初始化成功");
|
|
|
Pcs {}
|
|
|
}
|
|
|
+
|
|
|
+ // pub fn read(&self){
|
|
|
+ //
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
impl Service for Pcs {
|
|
|
fn run(&self) -> Result<JoinHandle<()>, Error> {
|
|
|
let handle = tokio::spawn(async {
|
|
|
+ let emu_config = EMU_CONFIG.get();
|
|
|
loop {
|
|
|
- println!("pcs");
|
|
|
- tokio::time::sleep(Duration::from_secs(1)).await;
|
|
|
+ tokio::time::sleep(Duration::from_millis(1)).await;
|
|
|
}
|
|
|
});
|
|
|
Ok(handle)
|