ngsankha / codejudge

host coding competitions anywhere, anytime
http://sankhs.com/codejudge
MIT License
90 stars 53 forks source link

Judge uses CPU time or total time? #38

Open guptaaditya13 opened 8 years ago

guptaaditya13 commented 8 years ago

I have doubt, while executing, the judge considers the total time spent by the process or the time spend by the process in CPU. ideally it should be the second one.

ngsankha commented 8 years ago

Yes, this is a bug that needs to be fixed. This should be the CPU time, but right now it only measures the total time spent by the process.

guptaaditya13 commented 8 years ago

@sankha93 do you have any idea how we can implement it?

ngsankha commented 8 years ago

Yes, I think some form of the ulimit needs to be set to fix the maximum CPU time of the program.

That said, I do agree there needs to be a better sandbox implementation for this. I have some ideas for it, may be I'll get to implementing it soon.