I try the following:
clear-cmdline() {
zle && zle kill-buffer
sched +3 clear-cmdline
}
sched +3 clear-cmdline
After I run this code, I enter a few letters at prompt, and wait. Nothing happens. Unless I continue typing, then the command line gets cleared. How to obtain desired effect of just clear of the command line?