I don’t use the timeout function and the rest of the build settings is the same as yours and it works fine.
PS:- I have been using another build settings lately for input and output file which I read from a blog from CodingBlocks.
But brother what you will do if your program goes in inifinite loops??? and then suddenly hang your window???
PS:- During competition this will occur with me due to that i waste a lot of time
Well I try to first analyze the complexity of my program and then code the solution and if there is an infinite loop just use the task manager to kill the program.
I’ll try your settings tomorrow and then try to fix it. I cannot assure you tho.
I tried to fix it but it seems the best way to stop the execution is to cancel the build.
Just change the preferences as described here.
There is nothing I could find that could just limit the time for the build/execution.
Whenever your code takes more than six seconds just use the cancel build option to immediately terminate it.
In Sublime Text, the default option to cancel build is ctrl+break.If your system does not have break button then go to preferences->key bindings and in the right column of window type:
[
{ “keys”: [“ctrl+alt+b”], “command”: “cancel_build” }
]
and save it or any other shortcut you like.
I faced this problem many times earlier but now i can just press ctrl+alt+b and it cancels build and can continue with program like nothing happened.
@lovlesh_007 Did you get an answer to your question? I am having the same issue. I don’t think that timeout is recognized as an command by the windows system. So this timeout trick would only work in linux. Nevertheless, if you got a solution can you share it with me.