Use python timeout instead elisp 'post-command-hook', add monitor function after 'post-command-hook' will cause mark highlight failed (don't know).