Mercurial > ~astiob > upreckon > hgweb
changeset 119:0b265fe9c81f
Wall-clock time limit is now enforced on the output wall-clock time
author | Oleg Oshmyan <chortos@inbox.lv> |
---|---|
date | Fri, 15 Apr 2011 03:06:29 +0300 |
parents | 16fe21d6582e |
children | 08a1d6cc5948 |
files | unix.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/unix.py Tue Apr 12 22:25:18 2011 +0300 +++ b/unix.py Fri Apr 15 03:06:29 2011 +0300 @@ -207,6 +207,9 @@ os.close(read) del bury_child.case new_rusage = getrusage(RUSAGE_CHILDREN) + if (case.maxwalltime and + case.time_stopped - case.time_started > case.maxwalltime): + raise testcases.WallTimeLimitExceeded if new_rusage and (case.maxcputime or not case.maxwalltime): case.time_started = cpustart case.time_stopped = new_rusage.ru_utime + new_rusage.ru_stime