log: ping-pong delay log

This commit is contained in:
mokurin000
2025-08-02 00:11:12 +08:00
parent 000251df65
commit dbe0890a4a

View File

@@ -1,6 +1,9 @@
use std::sync::{
use std::{
sync::{
Arc,
atomic::{AtomicBool, Ordering},
},
time::SystemTime,
};
use nyquest_preset::nyquest::ClientBuilder;
@@ -167,9 +170,13 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
human_readable_display(preview, human_readable)?;
}
commands::Commands::Ping => {
let time = SystemTime::now();
let decoded: PingResp =
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 } => {
let qrcode = QRCode { qrcode_content };