/********************************************************************/ /* */ /* The Why3 Verification Platform / The Why3 Development Team */ /* Copyright 2010-2016 -- INRIA - CNRS - Paris-Sud University */ /* */ /* This software is distributed under the terms of the GNU Lesser */ /* General Public License version 2.1, with the special exception */ /* on linking described in file LICENSE. */ /* */ /********************************************************************/ #ifndef _WIN32 #include #include #include #include #include #include #include #include #include #include #include #include static int wallclock_timelimit = 60; static int showtime = 0, hidetime = 0; void show_time() { struct tms tms; double time; if (showtime) { times(&tms); time = (double)((tms.tms_cutime + tms.tms_cstime + 0.0) / sysconf(_SC_CLK_TCK)); fprintf(stderr, "why3cpulimit time : %f s\n", time); } } void wallclock_timelimit_reached() { fprintf(stderr, "Why3cpulimit: wallclock timelimit %d reached, killing command\n", wallclock_timelimit); } void usage(char *argv0) { fprintf(stderr, "usage: %s