What can I replace with the sleep command in the Windows variant of ncurses?

75 Views Asked by At
#include <curses.h>
#include <unistd.h>
#include <iostream>
int main() {
    initscr();
    mvaddstr(10, 10, "Hello, world");
    refresh();
    sleep(4);
    endwin();
    std::cout << "DONE\n";
}

I'm working on a project and I need to take down the curses windows for a while just to write a path to directory in cmd and then let the curses windows come back. I found this code on this site and tried to use sleep command in the code but it didn't work.

So if anyone knew how to solve this please write it down here. Thnx :)

1

There are 1 best solutions below

0
Thomas Dickey On BEST ANSWER

napms is the (portable) curses function to use instead of sleep