Flushes delayed writes to the displayvoid sm_flush(void);
sm_flushperforms delayed writes and flushes all buffered output to the display. It is called automatically by sm_input when the keyboard is opened and there are no keystrokes available—that is, typed ahead.
Frequent calls to this function can significantly slow execution. Because it is called whenever the keyboard opens, the display is always up to date before data entry occurs.
You must use this function if you want timed output or other non-interactive display.
/* Update a system time field once per second,
* until a key is pressed. */
/* ...process the key */