log: ping-pong delay log
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
use std::sync::{
|
||||
Arc,
|
||||
atomic::{AtomicBool, Ordering},
|
||||
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 };
|
||||
|
||||
Reference in New Issue
Block a user