21 #ifndef Minisat_System_h
22 #define Minisat_System_h
24 #if defined(__linux__)
25 #include <fpu_control.h>
34 static inline double cpuTime(
void);
37 extern double memUsedPeak(
bool strictlyPeak =
false);
45 extern void limitTime(uint32_t max_cpu_time);
48 extern void sigTerm(
void handler(
int));
55 #if defined(_MSC_VER) || defined(__MINGW32__)
58 static inline double Minisat::cpuTime(
void) {
return (
double)clock() / CLOCKS_PER_SEC; }
62 #include <sys/resource.h>
67 getrusage(RUSAGE_SELF, &ru);
68 return (
double)ru.ru_utime.tv_sec + (double)ru.ru_utime.tv_usec / 1000000; }
static double cpuTime(void)
void setX86FPUPrecision()
void limitTime(uint32_t max_cpu_time)
void sigTerm(void handler(int))
void limitMemory(uint64_t max_mem_mb)
double memUsedPeak(bool strictlyPeak=false)