Ok, so I have to implement a round-robin simulator. The problem is that simulator should stop(as if the process would be being executed by the CPU). And I have no idea how to do that.
I didn't find anything about how to do that on the references and the forum. I thought about sleep(), but it seems it is only for threads...
Any idea is welcome.
The easiest way to make a sleep function would be to simply have a timer, and then a busy loop that continues until the timer has reached a certain point. Here is a quick example: