rust: update example

- use ncdirect_flush function for flushing
pull/1027/head
joseLuís 4 years ago
parent 5be9edd6f4
commit bcc5481899

@ -23,13 +23,13 @@ fn main() {
sleep(Duration::new(1, 0));
nc::ncdirect_putstr(ncd, 0, CString::new("HELLO").unwrap().as_ptr());
nc::ncdirect_flush(ncd);
nc::ncdirect_cursor_enable(ncd); // force flush
sleep(Duration::new(1, 0));
nc::ncdirect_putstr(ncd, 0, CString::new(" WORLD").unwrap().as_ptr());
nc::ncdirect_flush(ncd);
nc::ncdirect_cursor_enable(ncd); // force flush
sleep(Duration::new(1, 0));
// show current coordinates

Loading…
Cancel
Save