static void cmd_select_finish(struct imap_select_context *ctx, int ret)
{
const char *resp_code;
- struct timeval end_time;
- int time_msecs;
if (ret < 0) {
if (ctx->box != NULL)
} else {
resp_code = mailbox_is_readonly(ctx->box) ?
"READ-ONLY" : "READ-WRITE";
- if (gettimeofday(&end_time, NULL) < 0)
- memset(&end_time, 0, sizeof(end_time));
- time_msecs = timeval_diff_msecs(&end_time, &ctx->start_time);
client_send_tagline(ctx->cmd, t_strdup_printf(
- "OK [%s] %s completed (%d.%03d secs).", resp_code,
- ctx->cmd->client->mailbox_examined ? "Examine" : "Select",
- time_msecs/1000, time_msecs%1000));
+ "OK [%s] %s completed", resp_code,
+ ctx->cmd->client->mailbox_examined ? "Examine" : "Select"));
}
select_context_free(ctx);
}
enum search_return_options opts = ctx->return_options;
struct mail *mail;
enum mailbox_sync_flags sync_flags;
- struct timeval end_time;
const struct seq_range *range;
unsigned int count;
uint32_t id, id_min, id_max;
const char *ok_reply;
- int time_msecs;
bool tryagain, minmax, lost_data;
if (cmd->cancel) {
return TRUE;
}
- if (gettimeofday(&end_time, NULL) < 0)
- memset(&end_time, 0, sizeof(end_time));
-
- time_msecs = timeval_diff_msecs(&end_time, &ctx->start_time);
-
sync_flags = MAILBOX_SYNC_FLAG_FAST;
if (!cmd->uid || ctx->have_seqsets)
sync_flags |= MAILBOX_SYNC_FLAG_NO_EXPUNGES;
- ok_reply = t_strdup_printf("OK %s%s completed (%d.%03d secs).",
+ ok_reply = t_strdup_printf("OK %s%s completed",
lost_data ? "["IMAP_RESP_CODE_EXPUNGEISSUED"] " : "",
- !ctx->sorting ? "Search" : "Sort",
- time_msecs/1000, time_msecs%1000);
+ !ctx->sorting ? "Search" : "Sort");
return cmd_sync(cmd, sync_flags, 0, ok_reply);
}
ctx->search_ctx =
mailbox_search_init(ctx->trans, sargs, sort_program, 0, NULL);
ctx->sorting = sort_program != NULL;
- (void)gettimeofday(&ctx->start_time, NULL);
i_array_init(&ctx->result, 128);
if ((ctx->return_options & SEARCH_RETURN_UPDATE) != 0)
imap_search_result_save(ctx);