How would I go about prompting user-input, while at the same time running timers, to periodically execute automatic functions.
Pseudo-code to illustrate:
while true
{
if input() OR timer(10)
{
if input() != Nill
{
execute input.value
}
else
{
execute automatic/periodic functions
}
}
}
So basically it executes functions every 10 seconds, but gives the possibility to enter commands at the same time, without interrupting the timer. I would have to use threading to lock the processes while user-commands are being executed, so I don't get errors from automatic processes interrupting executions.