mirror of
https://github.com/chatmail/core.git
synced 2026-05-06 06:46:35 +03:00
add timeinfo for 'listmsgs' repl command
This commit is contained in:
@@ -525,9 +525,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
|||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
let time_needed = std::time::SystemTime::now()
|
let time_needed = time_start.elapsed().unwrap_or_default();
|
||||||
.duration_since(time_start)
|
|
||||||
.unwrap_or_default();
|
|
||||||
|
|
||||||
let cnt = chatlist.len();
|
let cnt = chatlist.len();
|
||||||
if cnt > 0 {
|
if cnt > 0 {
|
||||||
@@ -898,10 +896,13 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
|||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let time_start = std::time::SystemTime::now();
|
||||||
let msglist = context.search_msgs(chat, arg1).await?;
|
let msglist = context.search_msgs(chat, arg1).await?;
|
||||||
|
let time_needed = time_start.elapsed().unwrap_or_default();
|
||||||
|
|
||||||
log_msglist(&context, &msglist).await?;
|
log_msglist(&context, &msglist).await?;
|
||||||
println!("{} messages.", msglist.len());
|
println!("{} messages.", msglist.len());
|
||||||
|
println!("{:?} to create this list", time_needed);
|
||||||
}
|
}
|
||||||
"draft" => {
|
"draft" => {
|
||||||
ensure!(sel_chat.is_some(), "No chat selected.");
|
ensure!(sel_chat.is_some(), "No chat selected.");
|
||||||
|
|||||||
Reference in New Issue
Block a user