tests/C_C++/nf.c
2024-07-22 19:37:02 +02:00

29 lines
418 B
C

#include <ncurses.h>
#include <pthread.h>
#include <unistd.h>
void* fool(void* args){
sleep(2);
ungetch('x');
ungetch('c');
printw(" OK");
refresh();
}
int main() {
initscr();
cbreak(); // Set cbreak mode on
printw("Press any key to continue...");
refresh();
pthread_t th;
pthread_create(&th, NULL, fool, NULL);
getch();
pthread_join(th, NULL);
endwin();
return 0;
}