eval.c

dw_fluffos_v2/fluffos-2.9-ds2.05/eval.c · 359 B

From the archive dw_fluffos_v2.zip

Download the archive   « Back to the archive contents

#include "std.h"
#include "main.h"
#include "comm.h"
#include "uvalarm.h"

int outoftime = 0;

void set_eval(int time){
#ifndef WIN32
  signal(SIGVTALRM, sigalrm_handler);
  uvalarm(max_cost, 0);
#endif
  outoftime = 0;
}

int get_eval(){
  int ret;
#ifndef WIN32
  ret = uvalarm(2*max_cost, 0);
  uvalarm(ret, 0);
  return ret;
#else
  return 100;
#endif
}

Site Stats

Snippets: 1791
Codebases: 571