Hello!
I'm currently trying to make a small testing application for various programming tasks. It will run executable file which will generate output on another file and then compare it with answer. This far I think I will be able to get easy, but I have a problem...
I want to limit the time that this executable file can run, for example, 1 second or 2 seconds. So I was wondering is there an option which halts/exits the program if time limit is reached.
Operating system for now isn't a problem it can be windows or linux, though I would later switch the program to linux anyways, so it would be better if someone could give me some hint on how to do this.
So enough of 'blabbering' and I will just ask the question: Is there a way to set time limit for how long program can run either on Linux or Windows?