the blink problem is solved, the source is the ncurses rountine clear(), devil! Out of simplity I replaced it with a fresh difined function repaint_screen(), which brush blank characters in the whole screen in order to substitute the functions of clear()
smart_sleep() dynamically control the interval length, saving cpu consuming.