On 12.06.2015 19:32, Denis Rotanov wrote:
All user, processor and idleness time limits are being stored as *micro *seconds in *unsigned int*. If I set e.g. user time limit to -d=1 then after 430 turns I'll get 430`000`000. And check_limits_proc multiplies that by 10 before comparison, which results in overflow. I wonder what I should do. I see only two solutions 1. decrease granularity i.e. store at least milliseconds. 2. at least unsigned long long instead of unsigned int.I think I should not prolong limits by actually incrementing restriction values, but to set flag like "do_prolong_limits_" and then in limits check thread remember the current values of time props into `base_time_user` and `base_time_processor` and drop the flag then. So I will compare (current - base) vs. limit.