log: ping-pong delay log
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
use std::sync::{
|
use std::{
|
||||||
Arc,
|
sync::{
|
||||||
atomic::{AtomicBool, Ordering},
|
Arc,
|
||||||
|
atomic::{AtomicBool, Ordering},
|
||||||
|
},
|
||||||
|
time::SystemTime,
|
||||||
};
|
};
|
||||||
|
|
||||||
use nyquest_preset::nyquest::ClientBuilder;
|
use nyquest_preset::nyquest::ClientBuilder;
|
||||||
@@ -167,9 +170,13 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
|
|||||||
human_readable_display(preview, human_readable)?;
|
human_readable_display(preview, human_readable)?;
|
||||||
}
|
}
|
||||||
commands::Commands::Ping => {
|
commands::Commands::Ping => {
|
||||||
|
let time = SystemTime::now();
|
||||||
let decoded: PingResp =
|
let decoded: PingResp =
|
||||||
Sdgb1_50::request(&client, APIMethod::Ping, "", Ping {}).await?;
|
Sdgb1_50::request(&client, APIMethod::Ping, "", Ping {}).await?;
|
||||||
info!("sdgb 1.50 resp: {decoded}");
|
info!(
|
||||||
|
"sdgb 1.50 resp: {decoded}, {}ms",
|
||||||
|
time.elapsed().unwrap_or_default().as_millis()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
commands::Commands::QRLogin { ref qrcode_content } => {
|
commands::Commands::QRLogin { ref qrcode_content } => {
|
||||||
let qrcode = QRCode { qrcode_content };
|
let qrcode = QRCode { qrcode_content };
|
||||||
|
|||||||
Reference in New Issue
Block a user