I am using libsandbox
and there is this parameter in quota
named wallclock
.I googled and
found that it means time for which the program was active(ie. the real time
displayed
when we do ./a.out
running executable of a program).
I am using it for an online judge , so how does the wallclock
parameter vary from
program to program.What value should I give to it, and also if this time is exceeded what
error is thrown by the libsandbox.
libsandbox
can apply two types of time limit to sandboxed programs, namely, cpu clock
quota and wall clock
quota. Both can trigger result code TL
(time limit exceeded). Literally, cpu clock
defines the processor time consumed by the sandboxed program, and wall clock
measures the elapsed real-world time since the start of the sandboxed program.
The reason we need wall clock
quota is that some programs (e.g. idle programs and I/O-intensive programs) may exhibit slow cpu clock
consumption and remain alive for an undesirably long wall clock
life time.
The recommended value for wall clock
quota is 10x-15x that of the cpu clock
quota.
DISCLAIMER: I am the author of libsandbox
.