#include "aux.h" Request reqs[nreq]; int rc; long usecs (){ struct timeval t; gettimeofday(&t,NULL); return t.tv_sec*1000000+t.tv_usec; } void mysleep(double sec){ long s, e; s=0; e=0; s = usecs(); while(((double) e-s)/1000000 < sec) { e = usecs(); } return; } void init(Stack *bins){ int i; for(i=0; idata); res.type = req->type; res.data = req->data; res.id = req->id ; } void check(Stack *stacks){ int cnts[ntypes]; int i; for(i=0; i %2d %2d\n",cnts[i],stacks[i].head); */ if(stacks[i].head!=cnts[i]-1){ printf("Result is wrong :-(\n"); return; } } printf("Result is correct :-)\n"); return; }