Im trying to write a program that can display the status of the threads that are running and update when something changes while still waiting for user input. I am doing this programming in Linux and have been looking into curses, but i am still a little lost.. Any help would be greatly appreciated!!
this is what i want the main menu to look like:
| System Status |
| Data Log | Running |
| Main System | Starting |
| a) Config Menu |
| b) Stop System |
| c) Quit |
Please Enter Your Selection:
This is just a sample, but i would like to update the system status part while still waiting for the user input.
To do this for the console, the only way (that I know of) is to create a separate thread and have it do a countdown (waiting for user input). Once the countdown reaches zero, the thread ends and so will cin (or equivalent). Only at that time u'll be able to update the System Status (if there has been any changes since last update). The reason is because 'cin' waits indefinitely for user input...
I have thought about that already, The one thing that i am concerned about is if you try to type in your option and cant press enter before the screen refreshes... I know its a very small problem, but i would like to try to avoid it if i can.. :p